diff options
author | Max Horn | 2010-10-13 15:41:34 +0000 |
---|---|---|
committer | Max Horn | 2010-10-13 15:41:34 +0000 |
commit | 9b4d41d2d2a165a95b3b9223f53196fe51c0b14f (patch) | |
tree | 155156c08186657d76bdd9235b60fdafc3633960 /engines/sword25/gfx/animationtemplateregistry.h | |
parent | 8f4f0d16fc4e5cd4803203f2aaeb0ddc99e57204 (diff) | |
download | scummvm-rg350-9b4d41d2d2a165a95b3b9223f53196fe51c0b14f.tar.gz scummvm-rg350-9b4d41d2d2a165a95b3b9223f53196fe51c0b14f.tar.bz2 scummvm-rg350-9b4d41d2d2a165a95b3b9223f53196fe51c0b14f.zip |
SWORD25: Convert object registries to singletons
svn-id: r53431
Diffstat (limited to 'engines/sword25/gfx/animationtemplateregistry.h')
-rw-r--r-- | engines/sword25/gfx/animationtemplateregistry.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/sword25/gfx/animationtemplateregistry.h b/engines/sword25/gfx/animationtemplateregistry.h index 9c7140e585..c5308bb124 100644 --- a/engines/sword25/gfx/animationtemplateregistry.h +++ b/engines/sword25/gfx/animationtemplateregistry.h @@ -39,19 +39,17 @@ #include "sword25/kernel/persistable.h" #include "sword25/kernel/objectregistry.h" -#include "common/ptr.h" +#include "common/singleton.h" namespace Sword25 { class AnimationTemplate; -class AnimationTemplateRegistry : public ObjectRegistry<AnimationTemplate>, public Persistable { +class AnimationTemplateRegistry : + public ObjectRegistry<AnimationTemplate>, + public Persistable, + public Common::Singleton<AnimationTemplateRegistry> { public: - static AnimationTemplateRegistry &instance() { - if (!_instancePtr.get()) - _instancePtr.reset(new AnimationTemplateRegistry); - return *_instancePtr.get(); - } virtual bool persist(OutputPersistenceBlock &writer); virtual bool unpersist(InputPersistenceBlock &reader); @@ -59,8 +57,6 @@ public: private: virtual void logErrorLn(const char *message) const; virtual void logWarningLn(const char *message) const; - - static Common::ScopedPtr<AnimationTemplateRegistry> _instancePtr; }; } // End of namespace Sword25 |