diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-27 15:57:17 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-27 15:57:17 +0200 |
commit | fc4721139b2a7fb890f50105ea169ca4fa6544ac (patch) | |
tree | 987a9941ed8437fd49409f542407d505df77d425 /src/Daemon/Settings.cpp | |
parent | 27fa2ecd754cc383b5aecbc11feb6b59323f6397 (diff) | |
download | abrt-fc4721139b2a7fb890f50105ea169ca4fa6544ac.tar.gz abrt-fc4721139b2a7fb890f50105ea169ca4fa6544ac.tar.xz abrt-fc4721139b2a7fb890f50105ea169ca4fa6544ac.zip |
consolidate container typedefs in one file (we had a few dupes)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon/Settings.cpp')
-rw-r--r-- | src/Daemon/Settings.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp index 468213d..83aad1e 100644 --- a/src/Daemon/Settings.cpp +++ b/src/Daemon/Settings.cpp @@ -18,6 +18,7 @@ vector_pair_string_string_t g_settings_vectorActionsAndReporters; map_analyzer_actions_and_reporters_t g_settings_mapAnalyzerActionsAndReporters; +typedef std::map<std::string, std::string> map_settings_t; static map_settings_t s_mapSettingsCommon; static map_settings_t s_mapSettingsAnalyzerActionsAndReporters; static map_settings_t s_mapSettingsCron; @@ -47,9 +48,9 @@ static set_strings_t ParseList(const std::string& pList) return set; } -static vector_pair_strings_t ParseListWithArgs(const std::string& pValue) +static vector_pair_string_string_t ParseListWithArgs(const std::string& pValue) { - vector_pair_strings_t pluginsWithArgs; + vector_pair_string_string_t pluginsWithArgs; unsigned int ii; std::string item = ""; std::string action = ""; @@ -132,7 +133,7 @@ static void ParseCron() map_settings_t::iterator it = s_mapSettingsCron.begin(); for (; it != s_mapSettingsCron.end(); it++) { - vector_pair_strings_t actionsAndReporters = ParseListWithArgs(it->second); + vector_pair_string_string_t actionsAndReporters = ParseListWithArgs(it->second); g_settings_mapCron[it->first] = actionsAndReporters; } } @@ -185,7 +186,7 @@ static void ParseAnalyzerActionsAndReporters() for (; it != s_mapSettingsAnalyzerActionsAndReporters.end(); it++) { set_strings_t keys = ParseKey(it->first); - vector_pair_strings_t actionsAndReporters = ParseListWithArgs(it->second); + vector_pair_string_string_t actionsAndReporters = ParseListWithArgs(it->second); set_strings_t::iterator it_keys = keys.begin(); for (; it_keys != keys.end(); it_keys++) { @@ -288,13 +289,13 @@ void LoadSettings(const char* pPath) static void SaveSetString(const std::string& pKey, const set_strings_t& pSet, std::ofstream& pFOut, bool pNewLine = true) { - set_strings_t::const_iterator it_set; if (pKey != "") { pFOut << pKey << " = "; } int ii = 0; - for (it_set = pSet.begin(); it_set != pSet.end(); it_set++) + set_strings_t::const_iterator it_set = pSet.begin(); + for (; it_set != pSet.end(); it_set++) { pFOut << (*it_set); ii++; @@ -334,10 +335,10 @@ static void SaveVectorPairStrings(const std::string& pKey, const vector_pair_str } } -static void SaveMapVectorPairStrings(const map_vector_pair_strings_t& pMap, std::ofstream& pFOut, bool pNewLine = true) +static void SaveMapVectorPairStrings(const map_vector_pair_string_string_t& pMap, std::ofstream& pFOut, bool pNewLine = true) { - map_vector_pair_strings_t::const_iterator it; - for (it = pMap.begin(); it != pMap.end(); it++) + map_vector_pair_string_string_t::const_iterator it = pMap.begin(); + for (; it != pMap.end(); it++) { pFOut << it->first << " = "; SaveVectorPairStrings("", it->second, pFOut, false); |