Browse Source

workaround for vc++ bug

David Rose 24 years ago
parent
commit
d27eb921dc
1 changed files with 7 additions and 1 deletions
  1. 7 1
      panda/src/pgraph/pandaNode.cxx

+ 7 - 1
panda/src/pgraph/pandaNode.cxx

@@ -124,7 +124,13 @@ complete_pointers(TypedWritable **p_list, BamReader *manager) {
   Up::iterator ui;
   Up::iterator ui;
   for (ui = _up.begin(); ui != _up.end(); ++ui) {
   for (ui = _up.begin(); ui != _up.end(); ++ui) {
     PT(PandaNode) parent_node = DCAST(PandaNode, p_list[pi++]);
     PT(PandaNode) parent_node = DCAST(PandaNode, p_list[pi++]);
-    (*ui) = UpConnection(parent_node);
+
+    // For some reason, VC++ won't accept UpConnection as an inline
+    // temporary constructor here ("C2226: unexpected type
+    // PandaNode::UpConnection"), so we must make this assignment
+    // using an explicit temporary variable.
+    UpConnection connection(parent_node);
+    (*ui) = connection;
   }
   }
 
 
   // Get the child pointers.
   // Get the child pointers.