Use a temporary to avoid confusing the compiler.

This commit is contained in:
Mathieu Lacage
2008-02-28 08:59:35 -08:00
parent 21466b9afe
commit 8f6d84e669

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