X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/63f3a66069c0d87abd7c3f713299591df66dac7e..f8054f164b10a7b42a5250856ec83dca71ad3545:/projects/stargazer/plugins/store/mysql/mysql_store.cpp

diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp
index 859992e9..9d8f9c83 100644
--- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp
+++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp
@@ -106,13 +106,13 @@ return msc.GetPlugin();
 }
 //-----------------------------------------------------------------------------
 MYSQL_STORE_SETTINGS::MYSQL_STORE_SETTINGS()
-    : settings(NULL)
+    : settings(NULL),
+      errorStr(),
+      dbUser(),
+      dbPass(),
+      dbName(),
+      dbHost()
 {
-}
-//-----------------------------------------------------------------------------
-MYSQL_STORE_SETTINGS::~MYSQL_STORE_SETTINGS()
-{
-
 }
 //-----------------------------------------------------------------------------
 int MYSQL_STORE_SETTINGS::ParseParam(const vector<PARAM_VALUE> & moduleParams, 
@@ -151,54 +151,23 @@ if (ParseParam(s.moduleParams, "server", dbHost) < 0 &&
 return 0;
 }
 //-----------------------------------------------------------------------------
-const string & MYSQL_STORE_SETTINGS::GetStrError() const
-{
-return errorStr;
-}
-//-----------------------------------------------------------------------------
-string MYSQL_STORE_SETTINGS::GetDBUser() const
-{
-return dbUser;
-}
-//-----------------------------------------------------------------------------
-string MYSQL_STORE_SETTINGS::GetDBPassword() const
-{
-return dbPass;
-}
-//-----------------------------------------------------------------------------
-string MYSQL_STORE_SETTINGS::GetDBHost() const
-{
-return dbHost;
-}
-//-----------------------------------------------------------------------------
-string MYSQL_STORE_SETTINGS::GetDBName() const
-{
-return dbName;
-}
-//-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 MYSQL_STORE::MYSQL_STORE()
+    : errorStr(),
+      version("mysql_store v.0.67"),
+      storeSettings(),
+      settings()
 {
-version = "mysql_store v.0.67";
 };
 //-----------------------------------------------------------------------------
-MYSQL_STORE::~MYSQL_STORE()
-{    
-};
-//-----------------------------------------------------------------------------
-void MYSQL_STORE::SetSettings(const MODULE_SETTINGS & s)
-{
-settings = s;
-}
-//-----------------------------------------------------------------------------
 int    MYSQL_STORE::MysqlQuery(const char* sQuery,MYSQL * sock) const
 {
-    int ret,i;
+    int ret;
 
     if( (ret = mysql_query(sock,sQuery)) )
     {
-        for(i=0; i<RepitTimes; i++)
+        for(int i=0; i<RepitTimes; i++)
         {
             if( (ret = mysql_query(sock,sQuery)) )
                 ;//need to send error result
@@ -271,16 +240,6 @@ else
 return ret;
 }
 //-----------------------------------------------------------------------------
-const string & MYSQL_STORE::GetStrError() const
-{
-return errorStr;
-}
-//-----------------------------------------------------------------------------
-const string & MYSQL_STORE::GetVersion() const
-{
-return version;
-}
-//-----------------------------------------------------------------------------
 bool MYSQL_STORE::IsTablePresent(const string & str,MYSQL * sock)
 {
 MYSQL_RES* result;