X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FMippleton.hh;h=7ad17823a45862cfe7eae2b7f0d03148c34db692;hp=e9b97328d351ae9de7e08527a49984f90030231b;hb=7e898e8ec0ff716e2fc722b883a626a6c346f107;hpb=5fa5f117f28922a7e539a432367960c1a61f837d diff --git a/src/Moof/Mippleton.hh b/src/Moof/Mippleton.hh index e9b9732..7ad1782 100644 --- a/src/Moof/Mippleton.hh +++ b/src/Moof/Mippleton.hh @@ -51,13 +51,13 @@ namespace Mf { template class Mippleton { - typedef std::pair PtrValue; - typedef stlplus::hash PtrMap; + typedef std::pair PtrValue; + typedef stlplus::hash PtrMap; static PtrMap ptrs_; std::string name_; - inline static T* retain(const std::string& name) + static T* retain(const std::string& name) { typename PtrMap::iterator it = ptrs_.find(name); @@ -74,12 +74,12 @@ class Mippleton } } - inline static void release(T* obj) + static void release(T* obj) { releaseByName(obj->name_); } - inline static void releaseByName(const std::string& name) + static void releaseByName(const std::string& name) { typename PtrMap::iterator it; @@ -91,15 +91,16 @@ class Mippleton } public: + explicit Mippleton(const std::string& name) : name_(name) {} - inline const std::string& getName() const + const std::string& getName() const { return name_; } - inline static boost::shared_ptr getInstance(const std::string& name) + static boost::shared_ptr getInstance(const std::string& name) { return boost::shared_ptr(retain(name), &release); }