From 1202706839ec42299e8794750cec66dfa7db0206 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 6 Nov 2009 17:51:17 +0100 Subject: simplify logging a bit. warn_client() is gone, reuse error_msg() for it. Signed-off-by: Denys Vlasenko --- lib/Plugins/CCpp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Plugins/CCpp.cpp') diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index a2d65f3..b6a5db8 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -610,8 +610,8 @@ Another application is holding the yum lock, cannot continue if (last >= 0 && buff[last] == '\n') buff[last] = '\0'; - /* log(buff); - update_client logs it too */ - update_client(buff); /* maybe only if buff != ""? */ + log("%s", buff); + update_client("%s", buff); /* maybe only if buff != ""? */ #ifdef COMPLAIN_IF_NO_DEBUGINFO if (already_installed == false) @@ -715,8 +715,8 @@ static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids) } if (*p) { - /* log(buff); - update_client logs it too */ - update_client(buff); + log("%s", buff); + update_client("%s", buff); } } -- cgit From 57039b590e4411606795893c90f9871e0412ca31 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 6 Nov 2009 18:26:42 +0100 Subject: give Plugin class a map_plugin_settings_t member This simplifies and unifies get/set settings ops Signed-off-by: Denys Vlasenko --- lib/Plugins/CCpp.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib/Plugins/CCpp.cpp') diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index b6a5db8..4b73938 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -975,16 +975,14 @@ void CAnalyzerCCpp::SetSettings(const map_plugin_settings_t& pSettings) } } -map_plugin_settings_t CAnalyzerCCpp::GetSettings() +const map_plugin_settings_t& CAnalyzerCCpp::GetSettings() { - map_plugin_settings_t ret = m_pSettings; + m_pSettings["MemoryMap"] = m_bMemoryMap ? "yes" : "no"; + m_pSettings["DebugInfo"] = m_sDebugInfo; + m_pSettings["DebugInfoCacheMB"] = to_string(m_nDebugInfoCacheMB); + m_pSettings["InstallDebugInfo"] = m_bInstallDebugInfo ? "yes" : "no"; - ret["MemoryMap"] = m_bMemoryMap ? "yes" : "no"; - ret["DebugInfo"] = m_sDebugInfo; - ret["DebugInfoCacheMB"] = to_string(m_nDebugInfoCacheMB); - ret["InstallDebugInfo"] = m_bInstallDebugInfo ? "yes" : "no"; - - return ret; + return m_pSettings; } PLUGIN_INFO(ANALYZER, -- cgit