diff options
-rw-r--r-- | include/extensible.h | 6 | ||||
-rw-r--r-- | src/base.cpp | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/include/extensible.h b/include/extensible.h index a2c104377..b98bb921f 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -121,11 +121,15 @@ class CoreExport Extensible : public classbase class CoreExport ExtensionManager { - std::map<std::string, reference<ExtensionItem> > types; public: + typedef std::map<std::string, reference<ExtensionItem> > ExtMap; + bool Register(ExtensionItem* item); void BeginUnregister(Module* module, std::vector<reference<ExtensionItem> >& list); ExtensionItem* GetItem(const std::string& name); + + private: + ExtMap types; }; /** Base class for items that are NOT synchronized between servers */ diff --git a/src/base.cpp b/src/base.cpp index 67b136ec8..c268c7493 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -147,10 +147,10 @@ bool ExtensionManager::Register(ExtensionItem* item) void ExtensionManager::BeginUnregister(Module* module, std::vector<reference<ExtensionItem> >& list) { - std::map<std::string, reference<ExtensionItem> >::iterator i = types.begin(); + ExtMap::iterator i = types.begin(); while (i != types.end()) { - std::map<std::string, reference<ExtensionItem> >::iterator me = i++; + ExtMap::iterator me = i++; ExtensionItem* item = me->second; if (item->creator == module) { @@ -162,7 +162,7 @@ void ExtensionManager::BeginUnregister(Module* module, std::vector<reference<Ext ExtensionItem* ExtensionManager::GetItem(const std::string& name) { - std::map<std::string, reference<ExtensionItem> >::iterator i = types.find(name); + ExtMap::iterator i = types.find(name); if (i == types.end()) return NULL; return i->second; |