From 9e7d670745edd34a5502c9dc34a6177865dacb97 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 30 Jul 2013 11:42:28 -0700 Subject: [PATCH] Inline Class::get(const Ptr& ptr) --- apps/openmw/mwworld/class.cpp | 5 ----- apps/openmw/mwworld/class.hpp | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwworld/class.cpp b/apps/openmw/mwworld/class.cpp index 123027c9c..2c264020c 100644 --- a/apps/openmw/mwworld/class.cpp +++ b/apps/openmw/mwworld/class.cpp @@ -244,11 +244,6 @@ namespace MWWorld return *iter->second; } - const Class& Class::get (const Ptr& ptr) - { - return get (ptr.getTypeName()); - } - bool Class::isPersistent(const Ptr &ptr) const { throw std::runtime_error ("class does not support persistence"); diff --git a/apps/openmw/mwworld/class.hpp b/apps/openmw/mwworld/class.hpp index bfeeaba9f..edffd7d23 100644 --- a/apps/openmw/mwworld/class.hpp +++ b/apps/openmw/mwworld/class.hpp @@ -230,7 +230,10 @@ namespace MWWorld static const Class& get (const std::string& key); ///< If there is no class for this \a key, an exception is thrown. - static const Class& get (const Ptr& ptr); + static const Class& get (const Ptr& ptr) + { + return get (ptr.getTypeName()); + } ///< If there is no class for this pointer, an exception is thrown. static void registerClass (const std::string& key, boost::shared_ptr instance);