From: Maxim Mamontov Date: Mon, 4 Apr 2011 18:57:10 +0000 (+0300) Subject: dirName[] changed to vector X-Git-Tag: 2.407-rc3~86 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/01c8efc4c28d6f4fb844a4d70e53000104a049e9 dirName[] changed to vector --- diff --git a/projects/stargazer/settings_impl.cpp b/projects/stargazer/settings_impl.cpp index 0d0bc2ff..b547c4a7 100644 --- a/projects/stargazer/settings_impl.cpp +++ b/projects/stargazer/settings_impl.cpp @@ -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]; diff --git a/projects/stargazer/settings_impl.h b/projects/stargazer/settings_impl.h index b3e0f981..a5722a90 100644 --- a/projects/stargazer/settings_impl.h +++ b/projects/stargazer/settings_impl.h @@ -114,7 +114,7 @@ private: //////////settings std::string modulesPath; - std::string dirName[DIR_NUM]; + std::vector dirName; std::string confDir; std::string scriptsDir; std::string rules;