]> git.stg.codes - stg.git/commitdiff
Remove some more std::list.
authorMaksym Mamontov <madf@madf.info>
Mon, 27 Jan 2020 21:30:18 +0000 (23:30 +0200)
committerMaksym Mamontov <madf@madf.info>
Mon, 27 Jan 2020 21:30:18 +0000 (23:30 +0200)
stargazer/admins_impl.cpp
stargazer/admins_impl.h
stargazer/corps_impl.cpp
stargazer/corps_impl.h
stargazer/services_impl.cpp
stargazer/services_impl.h
stargazer/tariff_impl.h

index 8f2760ced67ef37a5b11a3bf09fb944ec9873d85..9708f986a5d8525775601361aafe118782123349 100644 (file)
@@ -123,7 +123,7 @@ while (si != searchDescriptors.end())
     ++si;
     }
 
     ++si;
     }
 
-data.remove(*ai);
+data.erase(ai);
 if (store->DelAdmin(login) < 0)
     {
     strError = "Administrator \'" + login + "\' was not deleted. Error: " + store->GetStrError();
 if (store->DelAdmin(login) < 0)
     {
     strError = "Administrator \'" + login + "\' was not deleted. Error: " + store->GetStrError();
index 03aa4ece97ed9a14463e9c511d66ed928635d6ea..d54a48c52a0c006598184f1b93d9bf664490baa1 100644 (file)
@@ -40,7 +40,7 @@
 #include "stg/noncopyable.h"
 #include "stg/logger.h"
 
 #include "stg/noncopyable.h"
 #include "stg/logger.h"
 
-#include <list>
+#include <vector>
 #include <map>
 #include <string>
 
 #include <map>
 #include <string>
 
@@ -73,14 +73,14 @@ private:
     ADMINS_IMPL(const ADMINS_IMPL & rvalue);
     ADMINS_IMPL & operator=(const ADMINS_IMPL & rvalue);
 
     ADMINS_IMPL(const ADMINS_IMPL & rvalue);
     ADMINS_IMPL & operator=(const ADMINS_IMPL & rvalue);
 
-    typedef std::list<ADMIN_IMPL>::iterator admin_iter;
-    typedef std::list<ADMIN_IMPL>::const_iterator const_admin_iter;
+    typedef std::vector<ADMIN_IMPL>::iterator admin_iter;
+    typedef std::vector<ADMIN_IMPL>::const_iterator const_admin_iter;
 
     int             Read();
 
     ADMIN_IMPL              stg;
     ADMIN_IMPL              noAdmin;
 
     int             Read();
 
     ADMIN_IMPL              stg;
     ADMIN_IMPL              noAdmin;
-    std::list<ADMIN_IMPL>   data;
+    std::vector<ADMIN_IMPL> data;
     STORE *                 store;
     STG_LOGGER &            WriteServLog;
     mutable std::map<int, const_admin_iter> searchDescriptors;
     STORE *                 store;
     STG_LOGGER &            WriteServLog;
     mutable std::map<int, const_admin_iter> searchDescriptors;
index 098acacac1b9f7ec6761d19751b1431b321e3c6d..3fe3f57204a665ebc1fc19d4fb06094e02ac3a0c 100644 (file)
@@ -111,7 +111,7 @@ while (csi != searchDescriptors.end())
     ++csi;
     }
 
     ++csi;
     }
 
-data.remove(*si);
+data.erase(si);
 if (store->DelCorp(name) < 0)
     {
     strError = "Corporation \'" + name + "\' was not deleted. Error: " + store->GetStrError();
 if (store->DelCorp(name) < 0)
     {
     strError = "Corporation \'" + name + "\' was not deleted. Error: " + store->GetStrError();
index 3765c5c1959aa67a9022e43949b6cb8f58d33615..aa1b33276bb6e9504691a1622fe87b91d003b2a1 100644 (file)
@@ -28,7 +28,7 @@
 #include "stg/noncopyable.h"
 #include "stg/logger.h"
 
 #include "stg/noncopyable.h"
 #include "stg/logger.h"
 
-#include <list>
+#include <vector>
 #include <map>
 #include <string>
 
 #include <map>
 #include <string>
 
@@ -58,12 +58,12 @@ private:
     CORPORATIONS_IMPL(const CORPORATIONS_IMPL & rvalue);
     CORPORATIONS_IMPL & operator=(const CORPORATIONS_IMPL & rvalue);
 
     CORPORATIONS_IMPL(const CORPORATIONS_IMPL & rvalue);
     CORPORATIONS_IMPL & operator=(const CORPORATIONS_IMPL & rvalue);
 
-    typedef std::list<CORP_CONF>::iterator       crp_iter;
-    typedef std::list<CORP_CONF>::const_iterator const_crp_iter;
+    typedef std::vector<CORP_CONF>::iterator       crp_iter;
+    typedef std::vector<CORP_CONF>::const_iterator const_crp_iter;
 
     bool Read();
 
 
     bool Read();
 
-    std::list<CORP_CONF> data;
+    std::vector<CORP_CONF> data;
     STORE * store;
     STG_LOGGER & WriteServLog;
     mutable std::map<int, const_crp_iter> searchDescriptors;
     STORE * store;
     STG_LOGGER & WriteServLog;
     mutable std::map<int, const_crp_iter> searchDescriptors;
index 109a327bbe1e5b500fd656b139b2559449787aa3..216fc64559b12555c43bb31d196a160742ca3ec0 100644 (file)
@@ -110,7 +110,7 @@ while (csi != searchDescriptors.end())
     ++csi;
     }
 
     ++csi;
     }
 
-data.remove(*si);
+data.erase(si);
 if (store->DelService(name) < 0)
     {
     strError = "Service \'" + name + "\' was not deleted. Error: " + store->GetStrError();
 if (store->DelService(name) < 0)
     {
     strError = "Service \'" + name + "\' was not deleted. Error: " + store->GetStrError();
index 8101f2d94314a0fb9709b2e7f6d37f3630325563..9f0c5c913b35cd3bc7fed22680b51b417cabec4c 100644 (file)
@@ -28,7 +28,7 @@
 #include "stg/noncopyable.h"
 #include "stg/logger.h"
 
 #include "stg/noncopyable.h"
 #include "stg/logger.h"
 
-#include <list>
+#include <vector>
 #include <map>
 #include <string>
 
 #include <map>
 #include <string>
 
@@ -59,12 +59,12 @@ private:
     SERVICES_IMPL(const SERVICES_IMPL & rvalue);
     SERVICES_IMPL & operator=(const SERVICES_IMPL & rvalue);
 
     SERVICES_IMPL(const SERVICES_IMPL & rvalue);
     SERVICES_IMPL & operator=(const SERVICES_IMPL & rvalue);
 
-    typedef std::list<SERVICE_CONF>::iterator       iterator;
-    typedef std::list<SERVICE_CONF>::const_iterator const_iterator;
+    typedef std::vector<SERVICE_CONF>::iterator       iterator;
+    typedef std::vector<SERVICE_CONF>::const_iterator const_iterator;
 
     bool Read();
 
 
     bool Read();
 
-    std::list<SERVICE_CONF> data;
+    std::vector<SERVICE_CONF> data;
     STORE *                 store;
     STG_LOGGER &            WriteServLog;
     mutable std::map<int, const_iterator> searchDescriptors;
     STORE *                 store;
     STG_LOGGER &            WriteServLog;
     mutable std::map<int, const_iterator> searchDescriptors;
index fe043589b4afc52eebf695af63f016670f1aa132..ca55a63a2bc72c6cda21d813de7ca2c7a39189aa 100644 (file)
@@ -35,7 +35,6 @@
 #include "stg/tariff_conf.h"
 
 #include <string>
 #include "stg/tariff_conf.h"
 
 #include <string>
-#include <list>
 
 #include <ctime>
 #include <cstdint>
 
 #include <ctime>
 #include <cstdint>