X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2FSingleton.hxx;h=0db235fec976aa7646ecf105b58d878fe43ce5c4;hb=02ac1a43c12c821c92a2e416d0ec343dbe5784e7;hp=0c3a59461b516d6d65abf8bde24c161838ec02c8;hpb=c5e8c6603c99a264862cc799029b9a7c2f44e75b;p=simgear.git diff --git a/simgear/structure/Singleton.hxx b/simgear/structure/Singleton.hxx index 0c3a5946..0db235fe 100644 --- a/simgear/structure/Singleton.hxx +++ b/simgear/structure/Singleton.hxx @@ -1,10 +1,7 @@ #ifndef SIMGEAR_SINGLETON_HXX #define SIMGEAR_SINGLETON_HXX 1 -#include - -#include -#include +#include "singleton.hpp" namespace simgear { @@ -27,32 +24,5 @@ public: } }; -template -class SingletonRefPtr -{ -public: - SingletonRefPtr() - { - ptr = new RefClass; - } - static RefClass* instance() - { - SingletonRefPtr& singleton - = boost::details::pool::singleton_default::instance(); - return singleton.ptr.get(); - } -private: - osg::ref_ptr ptr; -}; - -template -class ReferencedSingleton : public virtual osg::Referenced -{ -public: - static RefClass* instance() - { - return SingletonRefPtr::instance(); - } -}; } #endif