Browse Source

disambiguate for()

David Rose 24 years ago
parent
commit
3a1f1399bc
1 changed files with 6 additions and 4 deletions
  1. 6 4
      panda/src/pgraph/pandaNode.cxx

+ 6 - 4
panda/src/pgraph/pandaNode.cxx

@@ -1034,13 +1034,14 @@ steal_children(PandaNode *other) {
   // the end.
   // the end.
 
 
   int num_children = other->get_num_children();
   int num_children = other->get_num_children();
-  for (int i = 0; i < num_children; i++) {
+  int i;
+  for (i = 0; i < num_children; i++) {
     PandaNode *child_node = other->get_child(i);
     PandaNode *child_node = other->get_child(i);
     int sort = other->get_child_sort(i);
     int sort = other->get_child_sort(i);
     add_child(child_node, sort);
     add_child(child_node, sort);
   }
   }
   int num_stashed = other->get_num_stashed();
   int num_stashed = other->get_num_stashed();
-  for (int i = 0; i < num_stashed; i++) {
+  for (i = 0; i < num_stashed; i++) {
     PandaNode *child_node = other->get_stashed(i);
     PandaNode *child_node = other->get_stashed(i);
     int sort = other->get_stashed_sort(i);
     int sort = other->get_stashed_sort(i);
     add_stashed(child_node, sort);
     add_stashed(child_node, sort);
@@ -1062,13 +1063,14 @@ copy_children(PandaNode *other) {
     return;
     return;
   }
   }
   int num_children = other->get_num_children();
   int num_children = other->get_num_children();
-  for (int i = 0; i < num_children; i++) {
+  int i;
+  for (i = 0; i < num_children; i++) {
     PandaNode *child_node = other->get_child(i);
     PandaNode *child_node = other->get_child(i);
     int sort = other->get_child_sort(i);
     int sort = other->get_child_sort(i);
     add_child(child_node, sort);
     add_child(child_node, sort);
   }
   }
   int num_stashed = other->get_num_stashed();
   int num_stashed = other->get_num_stashed();
-  for (int i = 0; i < num_stashed; i++) {
+  for (i = 0; i < num_stashed; i++) {
     PandaNode *child_node = other->get_stashed(i);
     PandaNode *child_node = other->get_stashed(i);
     int sort = other->get_stashed_sort(i);
     int sort = other->get_stashed_sort(i);
     add_stashed(child_node, sort);
     add_stashed(child_node, sort);