From 8f6d84e66928dccefdbdbd95fb421625e2dbe650 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Thu, 28 Feb 2008 08:59:35 -0800 Subject: [PATCH] Use a temporary to avoid confusing the compiler. --- src/core/object-factory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/object-factory.h b/src/core/object-factory.h index 7da14ec9f..a3434310d 100644 --- a/src/core/object-factory.h +++ b/src/core/object-factory.h @@ -35,7 +35,8 @@ template Ptr ObjectFactory::Create (void) const { - return Create ()->GetObject (); + Ptr object = Create (); + return object->GetObject (); } } // namespace ns3