1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-14 06:40:40 +00:00

Inline Class::get(const Ptr& ptr)

This commit is contained in:
Chris Robinson 2013-07-30 11:42:28 -07:00
parent b8cd3f3915
commit 9e7d670745
2 changed files with 4 additions and 6 deletions

View File

@ -244,11 +244,6 @@ namespace MWWorld
return *iter->second; return *iter->second;
} }
const Class& Class::get (const Ptr& ptr)
{
return get (ptr.getTypeName());
}
bool Class::isPersistent(const Ptr &ptr) const bool Class::isPersistent(const Ptr &ptr) const
{ {
throw std::runtime_error ("class does not support persistence"); throw std::runtime_error ("class does not support persistence");

View File

@ -230,7 +230,10 @@ namespace MWWorld
static const Class& get (const std::string& key); static const Class& get (const std::string& key);
///< If there is no class for this \a key, an exception is thrown. ///< 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. ///< If there is no class for this pointer, an exception is thrown.
static void registerClass (const std::string& key, boost::shared_ptr<Class> instance); static void registerClass (const std::string& key, boost::shared_ptr<Class> instance);