Revision: 41199
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41199&view=rev
Author:   brlcad
Date:     2010-10-31 00:57:37 +0000 (Sun, 31 Oct 2010)

Log Message:
-----------
avoid using the 'new' c++ keyword for variable names

Modified Paths:
--------------
    brlcad/trunk/src/librt/db_tree.c

Modified: brlcad/trunk/src/librt/db_tree.c
===================================================================
--- brlcad/trunk/src/librt/db_tree.c    2010-10-31 00:53:06 UTC (rev 41198)
+++ brlcad/trunk/src/librt/db_tree.c    2010-10-31 00:57:37 UTC (rev 41199)
@@ -131,18 +131,18 @@
 struct combined_tree_state *
 db_new_combined_tree_state(const struct db_tree_state *tsp, const struct 
db_full_path *pathp)
 {
-    struct combined_tree_state *new;
+    struct combined_tree_state *new_ctsp;
 
     RT_CK_DBTS(tsp);
     RT_CK_FULL_PATH(pathp);
     RT_CK_DBI(tsp->ts_dbip);
 
-    BU_GETSTRUCT(new, combined_tree_state);
-    new->magic = RT_CTS_MAGIC;
-    db_dup_db_tree_state(&(new->cts_s), tsp);
-    db_full_path_init(&(new->cts_p));
-    db_dup_full_path(&(new->cts_p), pathp);
-    return new;
+    BU_GETSTRUCT(new_ctsp, combined_tree_state);
+    new_ctsp->magic = RT_CTS_MAGIC;
+    db_dup_db_tree_state(&(new_ctsp->cts_s), tsp);
+    db_full_path_init(&(new_ctsp->cts_p));
+    db_dup_full_path(&(new_ctsp->cts_p), pathp);
+    return new_ctsp;
 }
 
 
@@ -150,17 +150,17 @@
  * D B _ D U P _ C O M B I N E D _ T R E E _ S T A T E
  */
 struct combined_tree_state *
-db_dup_combined_tree_state(const struct combined_tree_state *old)
+db_dup_combined_tree_state(const struct combined_tree_state *old_ctsp)
 {
-    struct combined_tree_state *new;
+    struct combined_tree_state *new_ctsp;
 
-    RT_CK_CTS(old);
-    BU_GETSTRUCT(new, combined_tree_state);
-    new->magic = RT_CTS_MAGIC;
-    db_dup_db_tree_state(&(new->cts_s), &(old->cts_s));
-    db_full_path_init(&(new->cts_p));
-    db_dup_full_path(&(new->cts_p), &(old->cts_p));
-    return new;
+    RT_CK_CTS(old_ctsp);
+    BU_GETSTRUCT(new_ctsp, combined_tree_state);
+    new_ctsp->magic = RT_CTS_MAGIC;
+    db_dup_db_tree_state(&(new_ctsp->cts_s), &(old_ctsp->cts_s));
+    db_full_path_init(&(new_ctsp->cts_p));
+    db_dup_full_path(&(new_ctsp->cts_p), &(old_ctsp->cts_p));
+    return new_ctsp;
 }
 
 
@@ -1366,7 +1366,7 @@
 union tree *
 db_dup_subtree(const union tree *tp, struct resource *resp)
 {
-    union tree *new;
+    union tree *new_tp;
 
     if (!tp)
        return TREE_NULL;
@@ -1377,47 +1377,47 @@
     }
     RT_CK_RESOURCE(resp);
 
-    RT_GET_TREE(new, resp);
-    *new = *tp;                /* struct copy */
+    RT_GET_TREE(new_tp, resp);
+    *new_tp = *tp;             /* struct copy */
 
     switch (tp->tr_op) {
        case OP_NOP:
        case OP_SOLID:
            /* If this is a simple leaf, done */
-           return new;
+           return new_tp;
 
        case OP_DB_LEAF:
            if (tp->tr_l.tl_mat)
-               new->tr_l.tl_mat = bn_mat_dup(tp->tr_l.tl_mat);
-           new->tr_l.tl_name = bu_strdup(tp->tr_l.tl_name);
-           return new;
+               new_tp->tr_l.tl_mat = bn_mat_dup(tp->tr_l.tl_mat);
+           new_tp->tr_l.tl_name = bu_strdup(tp->tr_l.tl_name);
+           return new_tp;
 
        case OP_REGION:
            /* If this is a REGION leaf, dup combined_tree_state & path */
-           new->tr_c.tc_ctsp = db_dup_combined_tree_state(
+           new_tp->tr_c.tc_ctsp = db_dup_combined_tree_state(
                tp->tr_c.tc_ctsp);
-           return new;
+           return new_tp;
 
        case OP_NOT:
        case OP_GUARD:
        case OP_XNOP:
-           new->tr_b.tb_left = db_dup_subtree(tp->tr_b.tb_left, resp);
-           return new;
+           new_tp->tr_b.tb_left = db_dup_subtree(tp->tr_b.tb_left, resp);
+           return new_tp;
 
        case OP_UNION:
        case OP_INTERSECT:
        case OP_SUBTRACT:
        case OP_XOR:
            /* This node is known to be a binary op */
-           new->tr_b.tb_left = db_dup_subtree(tp->tr_b.tb_left, resp);
-           new->tr_b.tb_right = db_dup_subtree(tp->tr_b.tb_right, resp);
-           return new;
+           new_tp->tr_b.tb_left = db_dup_subtree(tp->tr_b.tb_left, resp);
+           new_tp->tr_b.tb_right = db_dup_subtree(tp->tr_b.tb_right, resp);
+           return new_tp;
 
        case OP_NMG_TESS: {
            /* FIXME: fake "copy" .. lie!!! */
-           new->tr_d.td_r = tp->tr_d.td_r;
-           new->tr_d.td_name = bu_strdup(tp->tr_d.td_name);
-           return new;
+           new_tp->tr_d.td_r = tp->tr_d.td_r;
+           new_tp->tr_d.td_name = bu_strdup(tp->tr_d.td_name);
+           return new_tp;
        }
 
        default:
@@ -1964,7 +1964,7 @@
     int lim,
     struct resource *resp)
 {
-    union tree *new;
+    union tree *new_tp;
 
     RT_CK_TREE(tp);
     if (!resp) {
@@ -1980,10 +1980,10 @@
        case OP_SOLID:
        case OP_REGION:
        case OP_DB_LEAF:
-           RT_GET_TREE(new, resp);
-           *new = *tp;         /* struct copy */
+           RT_GET_TREE(new_tp, resp);
+           *new_tp = *tp;              /* struct copy */
            tp->tr_op = OP_NOP; /* Zap original */
-           reg_trees[cur++] = new;
+           reg_trees[cur++] = new_tp;
            return cur;
 
        case OP_UNION:
@@ -1999,10 +1999,10 @@
        case OP_GUARD:
        case OP_XNOP:
            /* This is as far down as we go -- this is a region top */
-           RT_GET_TREE(new, resp);
-           *new = *tp;         /* struct copy */
+           RT_GET_TREE(new_tp, resp);
+           *new_tp = *tp;              /* struct copy */
            tp->tr_op = OP_NOP; /* Zap original */
-           reg_trees[cur++] = new;
+           reg_trees[cur++] = new_tp;
            return cur;
 
        default:
@@ -2385,14 +2385,14 @@
        if (whole_tree == TREE_NULL) {
            whole_tree = curtree;
        } else {
-           union tree *new;
+           union tree *new_tp;
 
-           RT_GET_TREE(new, ts.ts_resp);
-           new->magic = RT_TREE_MAGIC;
-           new->tr_op = OP_UNION;
-           new->tr_b.tb_left = whole_tree;
-           new->tr_b.tb_right = curtree;
-           whole_tree = new;
+           RT_GET_TREE(new_tp, ts.ts_resp);
+           new_tp->magic = RT_TREE_MAGIC;
+           new_tp->tr_op = OP_UNION;
+           new_tp->tr_b.tb_left = whole_tree;
+           new_tp->tr_b.tb_right = curtree;
+           whole_tree = new_tp;
        }
     }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to