]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/mysql/mysql_store.cpp
Убрана несипользуемая переменная в модуле store_mysql
[stg.git] / projects / stargazer / plugins / store / mysql / mysql_store.cpp
index 94503c78d06e4f7982afac73e43fd5e1ed6fe24c..fefadd5cb803b4b734303fd78b9541fb705d7a80 100644 (file)
@@ -1689,7 +1689,7 @@ if(MysqlSetQuery(res.c_str()))
 return 0;
 }
 //-----------------------------------------------------------------------------
-int MYSQL_STORE::WriteDetailedStat(const map<IP_DIR_PAIR, STAT_NODE> * statTree, 
+int MYSQL_STORE::WriteDetailedStat(const map<IP_DIR_PAIR, STAT_NODE> & statTree, 
                                    time_t lastStat, 
                                    const string & login) const
 {
@@ -1774,11 +1774,10 @@ strprintf(&res,"INSERT INTO detailstat_%02d_%4d SET login='%s',"\
     endTime.c_str()
     );
 
-int retRes;
 map<IP_DIR_PAIR, STAT_NODE>::const_iterator stIter;
-stIter = statTree->begin();
+stIter = statTree.begin();
 
-while (stIter != statTree->end())
+while (stIter != statTree.end())
     {
         strprintf(&tempStr,"IP='%s', dir=%d, down=%lld, up=%lld, cash=%f", 
                 inet_ntostring(stIter->first.ip).c_str(),
@@ -1788,7 +1787,7 @@ while (stIter != statTree->end())
                 stIter->second.cash
             );
     
-        if( (retRes = MysqlQuery((res+tempStr).c_str(),sock)) )
+        if( MysqlQuery((res+tempStr).c_str(),sock) )
         {
             errorStr = "Couldn't insert data in WriteDetailedStat:\n";
             errorStr += mysql_error(sock);