diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-18 18:14:28 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-09-18 18:14:28 +0200 |
commit | 1fd810c8cc2d166602374cf898b8f86e42e651e1 (patch) | |
tree | 64a05aeabca70ddc255e5a970ec25ec3a4f5d1a8 | |
parent | 64be7b89afc0822cf24aeeec588ff5f5af5fe8b4 (diff) | |
download | abrt-1fd810c8cc2d166602374cf898b8f86e42e651e1.tar.gz abrt-1fd810c8cc2d166602374cf898b8f86e42e651e1.tar.xz abrt-1fd810c8cc2d166602374cf898b8f86e42e651e1.zip |
remove a few #include <iostream>'s
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | lib/Plugins/Bugzilla.cpp | 1 | ||||
-rw-r--r-- | lib/Plugins/CCpp.cpp | 13 | ||||
-rw-r--r-- | lib/Plugins/FileTransfer.cpp | 1 | ||||
-rw-r--r-- | lib/Plugins/Kerneloops.cpp | 28 | ||||
-rw-r--r-- | lib/Plugins/Mailx.cpp | 5 | ||||
-rw-r--r-- | lib/Plugins/Python.cpp | 3 | ||||
-rw-r--r-- | lib/Plugins/SOSreport.cpp | 5 | ||||
-rw-r--r-- | lib/Plugins/SQLite3.cpp | 5 | ||||
-rw-r--r-- | lib/Plugins/TicketUploader.cpp | 2 | ||||
-rw-r--r-- | lib/Utils/CrashTypesSocket.cpp | 1 | ||||
-rw-r--r-- | lib/Utils/DebugDump.cpp | 1 | ||||
-rw-r--r-- | lib/Utils/Observer.h | 1 | ||||
-rw-r--r-- | src/Daemon/Settings.cpp | 2 |
13 files changed, 27 insertions, 41 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 9c223a6f..a3c70f04 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -1,6 +1,5 @@ #include <xmlrpc-c/base.hpp> -#include <sstream> #include "abrtlib.h" #include "Bugzilla.h" #include "CrashTypes.h" diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index 19b48952..3276b246 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -19,20 +19,19 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "abrtlib.h" -#include "CCpp.h" -#include "ABRTException.h" -#include "DebugDump.h" -#include "CommLayerInner.h" -#include "Polkit.h" #include <sys/wait.h> #include <fstream> #include <sstream> #include <set> #include <iomanip> - #include <nss.h> #include <sechash.h> +#include "abrtlib.h" +#include "CCpp.h" +#include "ABRTException.h" +#include "DebugDump.h" +#include "CommLayerInner.h" +#include "Polkit.h" #define CORE_PATTERN_IFACE "/proc/sys/kernel/core_pattern" #define CORE_PATTERN "|"CCPP_HOOK_PATH" "DEBUG_DUMPS_DIR" %p %s %u" diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp index 9e2ee1a4..9ae6501b 100644 --- a/lib/Plugins/FileTransfer.cpp +++ b/lib/Plugins/FileTransfer.cpp @@ -23,7 +23,6 @@ #include <sstream> #include <fstream> #include <curl/curl.h> - #include "abrtlib.h" #include "FileTransfer.h" #include "DebugDump.h" diff --git a/lib/Plugins/Kerneloops.cpp b/lib/Plugins/Kerneloops.cpp index 8e34392b..e01bb426 100644 --- a/lib/Plugins/Kerneloops.cpp +++ b/lib/Plugins/Kerneloops.cpp @@ -24,38 +24,38 @@ * Arjan van de Ven <arjan@linux.intel.com> */ +#include "abrtlib.h" #include "Kerneloops.h" #include "DebugDump.h" #include "ABRTException.h" #include "CommLayerInner.h" -#include <sstream> - #define FILENAME_KERNELOOPS "kerneloops" std::string CAnalyzerKerneloops::GetLocalUUID(const std::string& pDebugDumpDir) { - update_client(_("Getting local/global universal unique identification...")); + log(_("Getting local universal unique identification")); - std::string m_sOops; - std::stringstream m_sHash; - CDebugDump m_pDebugDump; - m_pDebugDump.Open(pDebugDumpDir); - m_pDebugDump.LoadText(FILENAME_KERNELOOPS, m_sOops); - m_pDebugDump.Close(); + std::string oops; + { + CDebugDump dd; + dd.Open(pDebugDumpDir); + dd.LoadText(FILENAME_KERNELOOPS, oops); + } /* An algorithm proposed by Donald E. Knuth in The Art Of Computer * Programming Volume 3, under the topic of sorting and search * chapter 6.4. */ - unsigned int m_nHash = static_cast<unsigned int>(m_sOops.length()); - for(std::size_t i = 0; i < m_sOops.length(); i++) + unsigned len = oops.length(); + unsigned hash = len; + for (unsigned i = 0; i < len; i++) { - m_nHash = ((m_nHash << 5) ^ (m_nHash >> 27)) ^ m_sOops[i]; + hash = ((hash << 5) ^ (hash >> 27)) ^ oops[i]; } - m_sHash << (m_nHash & 0x7FFFFFFF); + hash &= 0x7FFFFFFF; - return m_sHash.str(); + return to_string(hash); } std::string CAnalyzerKerneloops::GetGlobalUUID(const std::string& pDebugDumpDir) diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp index 8d009510..f7a86fd0 100644 --- a/lib/Plugins/Mailx.cpp +++ b/lib/Plugins/Mailx.cpp @@ -20,10 +20,9 @@ */ -#include "Mailx.h" -#include "abrtlib.h" #include <stdio.h> -#include <sstream> +#include "abrtlib.h" +#include "Mailx.h" #include "DebugDump.h" #include "ABRTException.h" #include "CommLayerInner.h" diff --git a/lib/Plugins/Python.cpp b/lib/Plugins/Python.cpp index 3e6926cd..9be76b3b 100644 --- a/lib/Plugins/Python.cpp +++ b/lib/Plugins/Python.cpp @@ -1,7 +1,6 @@ +#include <fstream> #include "Python.h" #include "DebugDump.h" - -#include <fstream> #include "ABRTException.h" #define FILENAME_BACKTRACE "backtrace" diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp index 0e47ff84..ab6125c4 100644 --- a/lib/Plugins/SOSreport.cpp +++ b/lib/Plugins/SOSreport.cpp @@ -18,15 +18,12 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "SOSreport.h" - #include <stdio.h> #include <string.h> #include <ext/stdio_filebuf.h> - #include <fstream> #include <sstream> - +#include "SOSreport.h" #include "DebugDump.h" #include "ABRTException.h" #include "CommLayerInner.h" diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index 700ac913..797ed2db 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -20,11 +20,10 @@ */ #include <sqlite3.h> -#include "SQLite3.h" #include <string> -#include <iostream> -#include "ABRTException.h" #include <stdlib.h> +#include "SQLite3.h" +#include "ABRTException.h" #define ABRT_TABLE_VERSION 2 diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp index db09b884..69243cd9 100644 --- a/lib/Plugins/TicketUploader.cpp +++ b/lib/Plugins/TicketUploader.cpp @@ -490,5 +490,3 @@ PLUGIN_INFO(REPORTER, "gavin@redhat.com", "https://fedorahosted.org/abtr/wiki", PLUGINS_LIB_DIR"/TicketUploader.GTKBuilder"); - - diff --git a/lib/Utils/CrashTypesSocket.cpp b/lib/Utils/CrashTypesSocket.cpp index dbbc1634..7c206deb 100644 --- a/lib/Utils/CrashTypesSocket.cpp +++ b/lib/Utils/CrashTypesSocket.cpp @@ -21,7 +21,6 @@ #include "abrtlib.h" #include "CrashTypesSocket.h" -#include <sstream> /** * A request GET_CRASH_INFOS has the following form: diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index 4d6d92c3..a36594b5 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -22,7 +22,6 @@ #include <fstream> #include <iostream> #include <sstream> -#include <cerrno> #include <sys/utsname.h> #include <magic.h> #include "abrtlib.h" diff --git a/lib/Utils/Observer.h b/lib/Utils/Observer.h index 421dc0cc..d6ec6f35 100644 --- a/lib/Utils/Observer.h +++ b/lib/Utils/Observer.h @@ -2,7 +2,6 @@ #define OBSERVER_H_ #include <string> -#include <iostream> #include <stdint.h> #include "DBusCommon.h" diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp index 90c8916c..1eb42263 100644 --- a/src/Daemon/Settings.cpp +++ b/src/Daemon/Settings.cpp @@ -1,8 +1,8 @@ +#include <fstream> #include "Settings.h" #include "abrtlib.h" #include "abrt_types.h" #include "Polkit.h" -#include <fstream> #define SECTION_COMMON "Common" #define SECTION_ANALYZER_ACTIONS_AND_REPORTERS "AnalyzerActionsAndReporters" |