From d27eb921dcf3628ced4e5e3b7e0b5e5502e09afd Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 11 Mar 2002 17:53:54 +0000 Subject: [PATCH] workaround for vc++ bug --- panda/src/pgraph/pandaNode.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/panda/src/pgraph/pandaNode.cxx b/panda/src/pgraph/pandaNode.cxx index 3081e09633..79ca3bf582 100644 --- a/panda/src/pgraph/pandaNode.cxx +++ b/panda/src/pgraph/pandaNode.cxx @@ -124,7 +124,13 @@ complete_pointers(TypedWritable **p_list, BamReader *manager) { Up::iterator ui; for (ui = _up.begin(); ui != _up.end(); ++ui) { 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.