X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/bfe43ecdff681f0b4395841a33a2721f8f8a983b..19ad06653de8ff5946a2ef1d577cf42217b2e3e3:/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp

diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
index 2210c951..19e3efec 100644
--- a/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
+++ b/projects/stargazer/plugins/store/postgresql/postgresql_store.cpp
@@ -44,30 +44,17 @@
 
 #include <libpq-fe.h>
 
-#include "postgresql_store.h"
-#include "postgresql_store_utils.h"
 #include "stg/module_settings.h"
+#include "stg/plugin_creator.h"
+#include "postgresql_store_utils.h"
+#include "postgresql_store.h"
 
-class POSTGRESQL_STORE_CREATOR
-{
-public:
-    POSTGRESQL_STORE_CREATOR()
-        : pqStore(new POSTGRESQL_STORE())
-        {
-        };
-    ~POSTGRESQL_STORE_CREATOR()
-        {
-        delete pqStore;
-        };
-    POSTGRESQL_STORE * GetStore() { return pqStore; };
-private:
-    POSTGRESQL_STORE * pqStore;
-} pqStoreeCreator;
+PLUGIN_CREATOR<POSTGRESQL_STORE> pqStoreeCreator;
 
 //-----------------------------------------------------------------------------
 STORE * GetStore()
 {
-return pqStoreeCreator.GetStore();
+return pqStoreeCreator.GetPlugin();
 }
 
 //-----------------------------------------------------------------------------