]> git.stg.codes - stg.git/commitdiff
dirName[] changed to vector
authorMaxim Mamontov <faust.madf@gmail.com>
Mon, 4 Apr 2011 18:57:10 +0000 (21:57 +0300)
committerMaxim Mamontov <faust.madf@gmail.com>
Mon, 4 Apr 2011 18:57:10 +0000 (21:57 +0300)
projects/stargazer/settings_impl.cpp
projects/stargazer/settings_impl.h

index 0d0bc2ff0265c9402224b1ac0a197089b3580e8e..b547c4a78225cec6d8de56e9e17d448c6f069a9e 100644 (file)
@@ -71,6 +71,7 @@ SETTINGS_IMPL::SETTINGS_IMPL()
 SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd)
     : strError(),
       modulesPath("/usr/lib/stg"),
+      dirName(DIR_NUM),
       confDir(cd),
       scriptsDir(cd),
       rules(cd + "/rules"),
@@ -100,6 +101,7 @@ SETTINGS_IMPL::SETTINGS_IMPL(const std::string & cd)
 SETTINGS_IMPL::SETTINGS_IMPL(const SETTINGS_IMPL & rval)
     : strError(),
       modulesPath(rval.modulesPath),
+      dirName(rval.dirName),
       confDir(rval.confDir),
       scriptsDir(rval.scriptsDir),
       rules(rval.rules),
@@ -432,6 +434,7 @@ while (node)
         if (child)
             {
             const DOTCONFDocumentNode * dirNameNode;
+            dirName.reserve(DIR_NUM);
             for (int i = 0; i < DIR_NUM; i++)
                 {
                 char strDirName[12];
index b3e0f981d70cdba09502bffff69cab744bd82ef3..a5722a90daf5401e677ed0113bf61c0191e656e2 100644 (file)
@@ -114,7 +114,7 @@ private:
 
     //////////settings
     std::string modulesPath;
-    std::string dirName[DIR_NUM];
+    std::vector<std::string> dirName;
     std::string confDir;
     std::string        scriptsDir;
     std::string rules;