Use a temporary to avoid confusing the compiler.

This commit is contained in:
Mathieu Lacage committed 2008-02-28 08:59:35 -08:00
1 parent 21466b9afe
commit 8f6d84e669
1 file changed
+2 -1
+2 -1
View File
@@ -35,7 +35,8 @@ template <typename T>
Ptr<T>
ObjectFactory::Create (void) const
{
return Create ()->GetObject<T> ();
Ptr<Object> object = Create ();
return object->GetObject<T> ();
}
} // namespace ns3