]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/firebird/firebird_store_corporations.cpp
Use std::jthread and C++17.
[stg.git] / projects / stargazer / plugins / store / firebird / firebird_store_corporations.cpp
index 6c4838803886ad162de817d20af7d4a7224b4cb4..0d088759dca26b0f28aa255c9cce8e379943bdc9 100644 (file)
  */
 
 #include "firebird_store.h"
+
 #include "stg/ibpp.h"
+#include "stg/corp_conf.h"
+#include "stg/common.h"
 
 //-----------------------------------------------------------------------------
 int FIREBIRD_STORE::GetCorpsList(std::vector<std::string> * corpsList) const
@@ -37,14 +40,13 @@ STG_LOCKER lock(&mutex);
 IBPP::Transaction tr = IBPP::TransactionFactory(db, IBPP::amRead, til, tlr);
 IBPP::Statement st = IBPP::StatementFactory(db, tr);
 
-std::string name;
-
 try
     {
     tr->Start();
     st->Execute("select name from tb_corporations");
     while (st->Fetch())
         {
+        std::string name;
         st->Get(1, name);
         corpsList->push_back(name);
         }
@@ -62,7 +64,7 @@ catch (IBPP::Exception & ex)
 return 0;
 }
 //-----------------------------------------------------------------------------
-int FIREBIRD_STORE::SaveCorp(const CORP_CONF & cc) const
+int FIREBIRD_STORE::SaveCorp(const STG::CorpConf & cc) const
 {
 STG_LOCKER lock(&mutex);
 
@@ -90,7 +92,7 @@ catch (IBPP::Exception & ex)
 return 0;
 }
 //-----------------------------------------------------------------------------
-int FIREBIRD_STORE::RestoreCorp(CORP_CONF * cc, const std::string & name) const
+int FIREBIRD_STORE::RestoreCorp(STG::CorpConf * cc, const std::string & name) const
 {
 STG_LOCKER lock(&mutex);