From 94e6be1a65614a473028093f7fae61b6bded06b8 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 4 Jan 2018 18:24:45 +0100 Subject: [PATCH] Remove unused includes --- lib/base/application.cpp | 10 ++++++---- lib/base/application.hpp | 9 +++++---- lib/base/configobject.cpp | 14 ++++---------- lib/base/configtype.hpp | 1 + lib/base/configwriter.cpp | 5 +---- lib/base/configwriter.hpp | 2 +- lib/base/console.hpp | 2 +- lib/base/context.cpp | 5 +++-- lib/base/dependencygraph.hpp | 1 + lib/base/exception.hpp | 1 - lib/base/functionwrapper.hpp | 3 +-- lib/base/logger.hpp | 2 +- lib/base/object.cpp | 6 ++++++ lib/base/object.hpp | 6 +++--- lib/base/objecttype.cpp | 1 + lib/base/perfdatavalue.cpp | 8 ++------ lib/base/process.hpp | 2 +- lib/base/registry.hpp | 2 +- lib/base/scriptglobal.cpp | 3 +-- lib/base/singleton.hpp | 15 ++------------- lib/base/socket.hpp | 1 + lib/base/socketevents.hpp | 1 + lib/base/stacktrace.hpp | 2 +- lib/base/stdiostream.hpp | 2 +- lib/base/stream.hpp | 2 ++ lib/base/streamlogger.hpp | 2 +- lib/base/string-script.cpp | 3 +-- lib/base/string.cpp | 3 +++ lib/base/string.hpp | 5 ----- lib/base/utility.cpp | 10 +++------- lib/base/value.hpp | 1 + lib/cli/clicommand.hpp | 5 +---- lib/cli/consolecommand.cpp | 4 ++-- lib/cli/featureutility.cpp | 1 + lib/cli/nodesetupcommand.cpp | 11 +++-------- lib/cli/nodeutility.cpp | 7 ++----- lib/icinga/comment.cpp | 5 +---- lib/icinga/dependency.cpp | 5 +---- lib/icinga/downtime.cpp | 5 +---- lib/icinga/externalcommandprocessor.cpp | 8 ++------ lib/icinga/icingaapplication.cpp | 1 + lib/icinga/legacytimeperiod.cpp | 18 +++++------------- lib/icinga/macroprocessor.cpp | 5 +---- lib/icinga/notification.cpp | 5 +---- lib/icinga/pluginutility.cpp | 5 +---- lib/icinga/scheduleddowntime.cpp | 5 +---- lib/icinga/service.cpp | 5 +---- lib/livestatus/endpointstable.cpp | 2 -- lib/livestatus/livestatuslogutility.cpp | 5 +---- lib/livestatus/livestatusquery.cpp | 10 +++------- lib/livestatus/logtable.cpp | 2 -- lib/livestatus/statehisttable.cpp | 2 -- lib/methods/clrchecktask.cpp | 2 -- lib/methods/pluginchecktask.cpp | 2 -- lib/perfdata/graphitewriter.cpp | 2 -- lib/perfdata/influxdbwriter.cpp | 2 -- lib/perfdata/opentsdbwriter.cpp | 2 -- lib/remote/actionshandler.cpp | 2 -- lib/remote/apiaction.hpp | 4 +--- lib/remote/apilistener-configsync.cpp | 5 +---- lib/remote/configobjectutility.cpp | 4 +--- lib/remote/configpackageshandler.cpp | 1 - lib/remote/configpackageutility.cpp | 4 +--- lib/remote/configstageshandler.cpp | 1 - lib/remote/consolehandler.cpp | 1 - lib/remote/createobjecthandler.cpp | 1 - lib/remote/deleteobjecthandler.cpp | 3 +-- lib/remote/filterutility.cpp | 2 +- lib/remote/httprequest.cpp | 6 +----- lib/remote/httpresponse.cpp | 5 +---- lib/remote/jsonrpcconnection.hpp | 2 +- lib/remote/modifyobjecthandler.cpp | 3 +-- lib/remote/objectqueryhandler.cpp | 2 +- lib/remote/templatequeryhandler.cpp | 2 +- lib/remote/typequeryhandler.cpp | 1 - lib/remote/variablequeryhandler.cpp | 1 - 76 files changed, 98 insertions(+), 208 deletions(-) diff --git a/lib/base/application.cpp b/lib/base/application.cpp index b06709d3e..573b92b3b 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -31,8 +31,6 @@ #include "base/convert.hpp" #include "base/scriptglobal.hpp" #include "base/process.hpp" -#include -#include #include #include #include @@ -508,8 +506,7 @@ String Application::GetExePath(const String& argv0) if (!foundSlash) { const char *pathEnv = getenv("PATH"); if (pathEnv) { - std::vector paths; - boost::algorithm::split(paths, pathEnv, boost::is_any_of(":")); + std::vector paths = String(pathEnv).Split(":"); bool foundPath = false; for (const String& path : paths) { @@ -1018,6 +1015,11 @@ int Application::Run() return Main(); } +void Application::UpdatePidFile(const String& filename) +{ + UpdatePidFile(filename, Utility::GetPid()); +} + /** * Grabs the PID file lock and updates the PID. Terminates the application * if the PID file is already locked by another instance of the application. diff --git a/lib/base/application.hpp b/lib/base/application.hpp index 0ff6ce383..dc54534cc 100644 --- a/lib/base/application.hpp +++ b/lib/base/application.hpp @@ -22,14 +22,14 @@ #include "base/i2-base.hpp" #include "base/application-ti.hpp" -#include "base/threadpool.hpp" -#include "base/utility.hpp" #include "base/logger.hpp" -#include +#include namespace icinga { +class ThreadPool; + /** * Abstract base class for applications. * @@ -78,7 +78,8 @@ public: static void SetDebuggingSeverity(LogSeverity severity); static LogSeverity GetDebuggingSeverity(); - void UpdatePidFile(const String& filename, pid_t pid = Utility::GetPid()); + void UpdatePidFile(const String& filename); + void UpdatePidFile(const String& filename, pid_t pid); void ClosePidFile(bool unlink); static pid_t ReadPidFile(const String& filename); diff --git a/lib/base/configobject.cpp b/lib/base/configobject.cpp index 5958497df..6aedfaca6 100644 --- a/lib/base/configobject.cpp +++ b/lib/base/configobject.cpp @@ -34,8 +34,6 @@ #include "base/context.hpp" #include "base/application.hpp" #include -#include -#include #include #include #include @@ -113,8 +111,7 @@ void ConfigObject::ModifyAttribute(const String& attr, const Value& value, bool Type::Ptr type = GetReflectionType(); - std::vector tokens; - boost::algorithm::split(tokens, attr, boost::is_any_of(".")); + std::vector tokens = attr.Split("."); String fieldName = tokens[0]; @@ -225,8 +222,7 @@ void ConfigObject::RestoreAttribute(const String& attr, bool updateVersion) { Type::Ptr type = GetReflectionType(); - std::vector tokens; - boost::algorithm::split(tokens, attr, boost::is_any_of(".")); + std::vector tokens = attr.Split("."); String fieldName = tokens[0]; @@ -279,8 +275,7 @@ void ConfigObject::RestoreAttribute(const String& attr, bool updateVersion) { ObjectLock olock(original_attributes); for (const auto& kv : original_attributes) { - std::vector originalTokens; - boost::algorithm::split(originalTokens, kv.first, boost::is_any_of(".")); + std::vector originalTokens = String(kv.first).Split("."); if (tokens.size() > originalTokens.size()) continue; @@ -654,8 +649,7 @@ void ConfigObject::DumpModifiedAttributes(const std::functionGetReflectionType(); - std::vector tokens; - boost::algorithm::split(tokens, key, boost::is_any_of(".")); + std::vector tokens = key.Split("."); String fieldName = tokens[0]; int fid = type->GetFieldId(fieldName); diff --git a/lib/base/configtype.hpp b/lib/base/configtype.hpp index b81ed5e1c..739bb0111 100644 --- a/lib/base/configtype.hpp +++ b/lib/base/configtype.hpp @@ -24,6 +24,7 @@ #include "base/object.hpp" #include "base/type.hpp" #include "base/dictionary.hpp" +#include namespace icinga { diff --git a/lib/base/configwriter.cpp b/lib/base/configwriter.cpp index 37eef9916..58851c2cf 100644 --- a/lib/base/configwriter.cpp +++ b/lib/base/configwriter.cpp @@ -21,8 +21,6 @@ #include "base/exception.hpp" #include #include -#include -#include #include #include @@ -95,8 +93,7 @@ void ConfigWriter::EmitScope(std::ostream& fp, int indentLevel, const Dictionary EmitIndent(fp, indentLevel); if (splitDot) { - std::vector tokens; - boost::algorithm::split(tokens, kv.first, boost::is_any_of(".")); + std::vector tokens = kv.first.Split("."); EmitIdentifier(fp, tokens[0], true); diff --git a/lib/base/configwriter.hpp b/lib/base/configwriter.hpp index 0ae4d92a5..1e3fc7759 100644 --- a/lib/base/configwriter.hpp +++ b/lib/base/configwriter.hpp @@ -23,7 +23,7 @@ #include "base/object.hpp" #include "base/array.hpp" #include "base/dictionary.hpp" -#include +#include namespace icinga { diff --git a/lib/base/console.hpp b/lib/base/console.hpp index 6e7a29bf9..63bcfe417 100644 --- a/lib/base/console.hpp +++ b/lib/base/console.hpp @@ -21,7 +21,7 @@ #define CONSOLE_H #include "base/i2-base.hpp" -#include +#include namespace icinga { diff --git a/lib/base/context.cpp b/lib/base/context.cpp index 09c46992c..a654d9909 100644 --- a/lib/base/context.cpp +++ b/lib/base/context.cpp @@ -19,6 +19,7 @@ #include "base/context.hpp" #include +#include using namespace icinga; @@ -51,11 +52,11 @@ void ContextTrace::Print(std::ostream& fp) const if (m_Frames.empty()) return; - fp << std::endl; + fp << "\n"; int i = 0; for (const String& frame : m_Frames) { - fp << "\t(" << i << ") " << frame << std::endl; + fp << "\t(" << i << ") " << frame << "\n"; i++; } } diff --git a/lib/base/dependencygraph.hpp b/lib/base/dependencygraph.hpp index 3c111c727..39f50a6ae 100644 --- a/lib/base/dependencygraph.hpp +++ b/lib/base/dependencygraph.hpp @@ -22,6 +22,7 @@ #include "base/i2-base.hpp" #include "base/object.hpp" +#include #include namespace icinga { diff --git a/lib/base/exception.hpp b/lib/base/exception.hpp index e4f53e50b..9e06f3666 100644 --- a/lib/base/exception.hpp +++ b/lib/base/exception.hpp @@ -28,7 +28,6 @@ #include "base/debuginfo.hpp" #include "base/dictionary.hpp" #include "base/configobject.hpp" -#include #include #include #include diff --git a/lib/base/functionwrapper.hpp b/lib/base/functionwrapper.hpp index 3dce01b96..da32bb7ed 100644 --- a/lib/base/functionwrapper.hpp +++ b/lib/base/functionwrapper.hpp @@ -22,12 +22,11 @@ #include "base/i2-base.hpp" #include "base/value.hpp" -#include #include #include #include #include -#include +#include using namespace std::placeholders; diff --git a/lib/base/logger.hpp b/lib/base/logger.hpp index d77252e88..1459e6efa 100644 --- a/lib/base/logger.hpp +++ b/lib/base/logger.hpp @@ -23,7 +23,7 @@ #include "base/i2-base.hpp" #include "base/logger-ti.hpp" #include -#include +#include namespace icinga { diff --git a/lib/base/object.cpp b/lib/base/object.cpp index 68dfa0431..e81422879 100644 --- a/lib/base/object.cpp +++ b/lib/base/object.cpp @@ -284,3 +284,9 @@ void icinga::intrusive_ptr_release(Object *object) delete object; } } + +void icinga::DefaultObjectFactoryCheckArgs(const std::vector& args) +{ + if (!args.empty()) + BOOST_THROW_EXCEPTION(std::invalid_argument("Constructor does not take any arguments.")); +} diff --git a/lib/base/object.hpp b/lib/base/object.hpp index 2dabb3038..bd1128f57 100644 --- a/lib/base/object.hpp +++ b/lib/base/object.hpp @@ -22,7 +22,6 @@ #include "base/i2-base.hpp" #include "base/debug.hpp" -#include #include #include @@ -58,11 +57,12 @@ extern Value Empty; DECLARE_PTR_TYPEDEFS(klass); \ IMPL_TYPE_LOOKUP(); +void DefaultObjectFactoryCheckArgs(const std::vector& args); + template intrusive_ptr DefaultObjectFactory(const std::vector& args) { - if (!args.empty()) - BOOST_THROW_EXCEPTION(std::invalid_argument("Constructor does not take any arguments.")); + DefaultObjectFactoryCheckArgs(args); return new T(); } diff --git a/lib/base/objecttype.cpp b/lib/base/objecttype.cpp index ed0a12bda..d77bfcdae 100644 --- a/lib/base/objecttype.cpp +++ b/lib/base/objecttype.cpp @@ -19,6 +19,7 @@ #include "base/objecttype.hpp" #include "base/initialize.hpp" +#include using namespace icinga; diff --git a/lib/base/perfdatavalue.cpp b/lib/base/perfdatavalue.cpp index 2dfdac57b..f2a93e128 100644 --- a/lib/base/perfdatavalue.cpp +++ b/lib/base/perfdatavalue.cpp @@ -23,9 +23,6 @@ #include "base/exception.hpp" #include "base/logger.hpp" #include "base/function.hpp" -#include -#include -#include using namespace icinga; @@ -69,8 +66,7 @@ PerfdataValue::Ptr PerfdataValue::Parse(const String& perfdata) double value = Convert::ToDouble(valueStr.SubStr(0, pos)); - std::vector tokens; - boost::algorithm::split(tokens, valueStr, boost::is_any_of(";")); + std::vector tokens = valueStr.Split(";"); bool counter = false; String unit; @@ -79,7 +75,7 @@ PerfdataValue::Ptr PerfdataValue::Parse(const String& perfdata) if (pos != String::NPos) unit = valueStr.SubStr(pos, tokens[0].GetLength() - pos); - boost::algorithm::to_lower(unit); + unit = unit.ToLower(); double base = 1.0; diff --git a/lib/base/process.hpp b/lib/base/process.hpp index b5d9db4e0..8dc9b7ca2 100644 --- a/lib/base/process.hpp +++ b/lib/base/process.hpp @@ -22,7 +22,7 @@ #include "base/i2-base.hpp" #include "base/dictionary.hpp" -#include +#include #include #include diff --git a/lib/base/registry.hpp b/lib/base/registry.hpp index b1fe350f9..9f13866d6 100644 --- a/lib/base/registry.hpp +++ b/lib/base/registry.hpp @@ -22,9 +22,9 @@ #include "base/i2-base.hpp" #include "base/string.hpp" -#include #include #include +#include namespace icinga { diff --git a/lib/base/scriptglobal.cpp b/lib/base/scriptglobal.cpp index dc7bb3296..d9e180cf9 100644 --- a/lib/base/scriptglobal.cpp +++ b/lib/base/scriptglobal.cpp @@ -49,8 +49,7 @@ Value ScriptGlobal::Get(const String& name, const Value *defaultValue) void ScriptGlobal::Set(const String& name, const Value& value) { - std::vector tokens; - boost::algorithm::split(tokens, name, boost::is_any_of(".")); + std::vector tokens = name.Split("."); if (tokens.empty()) BOOST_THROW_EXCEPTION(std::invalid_argument("Name must not be empty")); diff --git a/lib/base/singleton.hpp b/lib/base/singleton.hpp index 6bffc4a73..535c3faee 100644 --- a/lib/base/singleton.hpp +++ b/lib/base/singleton.hpp @@ -37,20 +37,9 @@ class Singleton public: static T *GetInstance() { - /* FIXME: This relies on static initializers being atomic. */ - static boost::mutex mutex; - boost::mutex::scoped_lock lock(mutex); - - static T *instance; - - if (!instance) - instance = new T(); - - return instance; + static T instance; + return &instance; } - -private: - static T *m_Instance; }; } diff --git a/lib/base/socket.hpp b/lib/base/socket.hpp index 464983a7c..89147c57d 100644 --- a/lib/base/socket.hpp +++ b/lib/base/socket.hpp @@ -22,6 +22,7 @@ #include "base/i2-base.hpp" #include "base/object.hpp" +#include namespace icinga { diff --git a/lib/base/socketevents.hpp b/lib/base/socketevents.hpp index 7d7ae19fb..360a03477 100644 --- a/lib/base/socketevents.hpp +++ b/lib/base/socketevents.hpp @@ -22,6 +22,7 @@ #include "base/i2-base.hpp" #include "base/socket.hpp" +#include #include #ifndef _WIN32 diff --git a/lib/base/stacktrace.hpp b/lib/base/stacktrace.hpp index 10ff3e327..1a197de2b 100644 --- a/lib/base/stacktrace.hpp +++ b/lib/base/stacktrace.hpp @@ -21,7 +21,7 @@ #define STACKTRACE_H #include "base/i2-base.hpp" -#include +#include namespace icinga { diff --git a/lib/base/stdiostream.hpp b/lib/base/stdiostream.hpp index 027e39f97..e72cf4c43 100644 --- a/lib/base/stdiostream.hpp +++ b/lib/base/stdiostream.hpp @@ -22,7 +22,7 @@ #include "base/i2-base.hpp" #include "base/stream.hpp" -#include +#include namespace icinga { diff --git a/lib/base/stream.hpp b/lib/base/stream.hpp index 0af5fb11a..58569246c 100644 --- a/lib/base/stream.hpp +++ b/lib/base/stream.hpp @@ -23,6 +23,8 @@ #include "base/i2-base.hpp" #include "base/object.hpp" #include +#include +#include namespace icinga { diff --git a/lib/base/streamlogger.hpp b/lib/base/streamlogger.hpp index 3c6e6faf6..ae08361c5 100644 --- a/lib/base/streamlogger.hpp +++ b/lib/base/streamlogger.hpp @@ -23,7 +23,7 @@ #include "base/i2-base.hpp" #include "base/streamlogger-ti.hpp" #include "base/timer.hpp" -#include +#include namespace icinga { diff --git a/lib/base/string-script.cpp b/lib/base/string-script.cpp index 83cc9c3fa..2edb6dd01 100644 --- a/lib/base/string-script.cpp +++ b/lib/base/string-script.cpp @@ -75,8 +75,7 @@ static Array::Ptr StringSplit(const String& delims) { ScriptFrame *vframe = ScriptFrame::GetCurrentFrame(); String self = vframe->Self; - std::vector tokens; - boost::algorithm::split(tokens, self, boost::is_any_of(delims)); + std::vector tokens = self.Split(delims.CStr()); return Array::FromVector(tokens); } diff --git a/lib/base/string.cpp b/lib/base/string.cpp index 393783674..5970f6ebf 100644 --- a/lib/base/string.cpp +++ b/lib/base/string.cpp @@ -21,6 +21,9 @@ #include "base/value.hpp" #include "base/primitivetype.hpp" #include "base/dictionary.hpp" +#include +#include +#include #include using namespace icinga; diff --git a/lib/base/string.hpp b/lib/base/string.hpp index 4a17eaeeb..70b6f9e37 100644 --- a/lib/base/string.hpp +++ b/lib/base/string.hpp @@ -22,12 +22,7 @@ #include "base/i2-base.hpp" #include "base/object.hpp" -#include -#include -#include #include -#include -#include #include #include diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp index 0171ac4a5..f9cf18cdb 100644 --- a/lib/base/utility.cpp +++ b/lib/base/utility.cpp @@ -29,8 +29,6 @@ #include #include #include -#include -#include #include #include #include @@ -509,8 +507,7 @@ bool Utility::Glob(const String& pathSpec, const std::function files, dirs; #ifdef _WIN32 - std::vector tokens; - boost::algorithm::split(tokens, pathSpec, boost::is_any_of("\\/")); + std::vector tokens = pathSpec.Split("\\/"); String part1; @@ -1249,9 +1246,8 @@ unsigned long Utility::SDBM(const String& str, size_t len) int Utility::CompareVersion(const String& v1, const String& v2) { - std::vector tokensv1, tokensv2; - boost::algorithm::split(tokensv1, v1, boost::is_any_of(".")); - boost::algorithm::split(tokensv2, v2, boost::is_any_of(".")); + std::vector tokensv1 = v1.Split("."); + std::vector tokensv2 = v2.Split("."); for (std::vector::size_type i = 0; i < tokensv2.size() - tokensv1.size(); i++) tokensv1.emplace_back("0"); diff --git a/lib/base/value.hpp b/lib/base/value.hpp index 29ca2e9f7..9d036c2b7 100644 --- a/lib/base/value.hpp +++ b/lib/base/value.hpp @@ -24,6 +24,7 @@ #include "base/string.hpp" #include #include +#include namespace icinga { diff --git a/lib/cli/clicommand.hpp b/lib/cli/clicommand.hpp index ef0ef7644..3023ed4f9 100644 --- a/lib/cli/clicommand.hpp +++ b/lib/cli/clicommand.hpp @@ -26,8 +26,6 @@ #include "base/type.hpp" #include #include -#include -#include namespace icinga { @@ -89,8 +87,7 @@ private: #define REGISTER_CLICOMMAND(name, klass) \ INITIALIZE_ONCE([]() { \ - std::vector vname; \ - boost::algorithm::split(vname, name, boost::is_any_of("/")); \ + std::vector vname = String(name).Split("/"); \ CLICommand::Register(vname, new klass()); \ }) diff --git a/lib/cli/consolecommand.cpp b/lib/cli/consolecommand.cpp index c102452dc..3c05bd8b6 100644 --- a/lib/cli/consolecommand.cpp +++ b/lib/cli/consolecommand.cpp @@ -33,6 +33,7 @@ #include "base/networkstream.hpp" #include "base/exception.hpp" #include +#include #ifdef HAVE_EDITLINE #include "cli/editline.hpp" #endif /* HAVE_EDITLINE */ @@ -455,8 +456,7 @@ incomplete: if (commandOnceFileName.IsEmpty() && lines.find(di.Path) != lines.end()) { String text = lines[di.Path]; - std::vector ulines; - boost::algorithm::split(ulines, text, boost::is_any_of("\n")); + std::vector ulines = text.Split("\n"); for (int i = 1; i <= ulines.size(); i++) { int start, len; diff --git a/lib/cli/featureutility.cpp b/lib/cli/featureutility.cpp index 5de595369..9056b60fe 100644 --- a/lib/cli/featureutility.cpp +++ b/lib/cli/featureutility.cpp @@ -21,6 +21,7 @@ #include "base/logger.hpp" #include "base/console.hpp" #include "base/application.hpp" +#include "base/utility.hpp" #include #include #include diff --git a/lib/cli/nodesetupcommand.cpp b/lib/cli/nodesetupcommand.cpp index 01c004545..afb406154 100644 --- a/lib/cli/nodesetupcommand.cpp +++ b/lib/cli/nodesetupcommand.cpp @@ -29,10 +29,8 @@ #include "base/tlsutility.hpp" #include "base/scriptglobal.hpp" #include "base/exception.hpp" -#include #include #include -#include #include #include @@ -176,8 +174,7 @@ int NodeSetupCommand::SetupMaster(const boost::program_options::variables_map& v << "object ApiListener \"api\" {\n"; if (vm.count("listen")) { - std::vector tokens; - boost::algorithm::split(tokens, vm["listen"].as(), boost::is_any_of(",")); + std::vector tokens = String(vm["listen"].as()).Split(","); if (tokens.size() > 0) fp << " bind_host = \"" << tokens[0] << "\"\n"; @@ -259,8 +256,7 @@ int NodeSetupCommand::SetupNode(const boost::program_options::variables_map& vm, return 1; } - std::vector tokens; - boost::algorithm::split(tokens, vm["master_host"].as(), boost::is_any_of(",")); + std::vector tokens = String(vm["master_host"].as()).Split(","); String master_host; String master_port = "5665"; @@ -373,8 +369,7 @@ int NodeSetupCommand::SetupNode(const boost::program_options::variables_map& vm, << "object ApiListener \"api\" {\n"; if (vm.count("listen")) { - std::vector tokens; - boost::algorithm::split(tokens, vm["listen"].as(), boost::is_any_of(",")); + std::vector tokens = String(vm["listen"].as()).Split(","); if (tokens.size() > 0) fp << " bind_host = \"" << tokens[0] << "\"\n"; diff --git a/lib/cli/nodeutility.cpp b/lib/cli/nodeutility.cpp index 0157d6d23..82417d562 100644 --- a/lib/cli/nodeutility.cpp +++ b/lib/cli/nodeutility.cpp @@ -34,10 +34,8 @@ #include "base/console.hpp" #include "base/exception.hpp" #include "base/configwriter.hpp" -#include #include #include -#include #include #include @@ -60,10 +58,9 @@ int NodeUtility::GenerateNodeIcingaConfig(const std::vector& endpoi String master_zone_name = "master"; //TODO: Find a better name. - for (const std::string& endpoint : endpoints) { + for (const String& endpoint : endpoints) { /* extract all --endpoint arguments and store host,port info */ - std::vector tokens; - boost::algorithm::split(tokens, endpoint, boost::is_any_of(",")); + std::vector tokens = endpoint.Split(","); Dictionary::Ptr my_master_endpoint = new Dictionary(); diff --git a/lib/icinga/comment.cpp b/lib/icinga/comment.cpp index 2eb8c4f6d..c23e14619 100644 --- a/lib/icinga/comment.cpp +++ b/lib/icinga/comment.cpp @@ -24,8 +24,6 @@ #include "base/utility.hpp" #include "base/configtype.hpp" #include "base/timer.hpp" -#include -#include #include using namespace icinga; @@ -59,8 +57,7 @@ String CommentNameComposer::MakeName(const String& shortName, const Object::Ptr& Dictionary::Ptr CommentNameComposer::ParseName(const String& name) const { - std::vector tokens; - boost::algorithm::split(tokens, name, boost::is_any_of("!")); + std::vector tokens = name.Split("!"); if (tokens.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid Comment name.")); diff --git a/lib/icinga/dependency.cpp b/lib/icinga/dependency.cpp index 1c81efdc2..328a20e76 100644 --- a/lib/icinga/dependency.cpp +++ b/lib/icinga/dependency.cpp @@ -22,8 +22,6 @@ #include "icinga/service.hpp" #include "base/logger.hpp" #include "base/exception.hpp" -#include -#include using namespace icinga; @@ -48,8 +46,7 @@ String DependencyNameComposer::MakeName(const String& shortName, const Object::P Dictionary::Ptr DependencyNameComposer::ParseName(const String& name) const { - std::vector tokens; - boost::algorithm::split(tokens, name, boost::is_any_of("!")); + std::vector tokens = name.Split("!"); if (tokens.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid Dependency name.")); diff --git a/lib/icinga/downtime.cpp b/lib/icinga/downtime.cpp index 3b0403b60..a52358359 100644 --- a/lib/icinga/downtime.cpp +++ b/lib/icinga/downtime.cpp @@ -25,8 +25,6 @@ #include "base/configtype.hpp" #include "base/utility.hpp" #include "base/timer.hpp" -#include -#include #include using namespace icinga; @@ -63,8 +61,7 @@ String DowntimeNameComposer::MakeName(const String& shortName, const Object::Ptr Dictionary::Ptr DowntimeNameComposer::ParseName(const String& name) const { - std::vector tokens; - boost::algorithm::split(tokens, name, boost::is_any_of("!")); + std::vector tokens = name.Split("!"); if (tokens.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid Downtime name.")); diff --git a/lib/icinga/externalcommandprocessor.cpp b/lib/icinga/externalcommandprocessor.cpp index 6f04da4b8..f117743fa 100644 --- a/lib/icinga/externalcommandprocessor.cpp +++ b/lib/icinga/externalcommandprocessor.cpp @@ -37,8 +37,6 @@ #include "base/utility.hpp" #include "base/exception.hpp" #include -#include -#include #include using namespace icinga; @@ -66,8 +64,7 @@ void ExternalCommandProcessor::Execute(const String& line) if (ts == 0) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid timestamp in command: " + line)); - std::vector argv; - boost::algorithm::split(argv, args, boost::is_any_of(";")); + std::vector argv = args.Split(";"); if (argv.empty()) BOOST_THROW_EXCEPTION(std::invalid_argument("Missing arguments in command: " + line)); @@ -277,8 +274,7 @@ void ExternalCommandProcessor::ExecuteFromFile(const String& line, std::deque< s if (ts == 0) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid timestamp in command: " + line)); - std::vector argv; - boost::algorithm::split(argv, args, boost::is_any_of(";")); + std::vector argv = args.Split(";"); if (argv.empty()) BOOST_THROW_EXCEPTION(std::invalid_argument("Missing arguments in command: " + line)); diff --git a/lib/icinga/icingaapplication.cpp b/lib/icinga/icingaapplication.cpp index cbec96b8d..eea8d1825 100644 --- a/lib/icinga/icingaapplication.cpp +++ b/lib/icinga/icingaapplication.cpp @@ -34,6 +34,7 @@ #include "base/initialize.hpp" #include "base/statsfunction.hpp" #include "base/loader.hpp" +#include using namespace icinga; diff --git a/lib/icinga/legacytimeperiod.cpp b/lib/icinga/legacytimeperiod.cpp index 2204f4835..5fe893035 100644 --- a/lib/icinga/legacytimeperiod.cpp +++ b/lib/icinga/legacytimeperiod.cpp @@ -25,8 +25,6 @@ #include "base/logger.hpp" #include "base/debug.hpp" #include "base/utility.hpp" -#include -#include using namespace icinga; @@ -171,8 +169,7 @@ void LegacyTimePeriod::ParseTimeSpec(const String& timespec, tm *begin, tm *end, return; } - std::vector tokens; - boost::algorithm::split(tokens, timespec, boost::is_any_of(" ")); + std::vector tokens = timespec.Split(" "); int mon = -1; @@ -335,20 +332,17 @@ bool LegacyTimePeriod::IsInDayDefinition(const String& daydef, tm *reference) void LegacyTimePeriod::ProcessTimeRangeRaw(const String& timerange, tm *reference, tm *begin, tm *end) { - std::vector times; - - boost::algorithm::split(times, timerange, boost::is_any_of("-")); + std::vector times = timerange.Split("-"); if (times.size() != 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid timerange: " + timerange)); - std::vector hd1, hd2; - boost::algorithm::split(hd1, times[0], boost::is_any_of(":")); + std::vector hd1 = times[0].Split(":"); if (hd1.size() != 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid time specification: " + times[0])); - boost::algorithm::split(hd2, times[1], boost::is_any_of(":")); + std::vector hd2 = times[1].Split(":"); if (hd2.size() != 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid time specification: " + times[1])); @@ -382,9 +376,7 @@ Dictionary::Ptr LegacyTimePeriod::ProcessTimeRange(const String& timestamp, tm * void LegacyTimePeriod::ProcessTimeRanges(const String& timeranges, tm *reference, const Array::Ptr& result) { - std::vector ranges; - - boost::algorithm::split(ranges, timeranges, boost::is_any_of(",")); + std::vector ranges = timeranges.Split(","); for (const String& range : ranges) { Dictionary::Ptr segment = ProcessTimeRange(range, reference); diff --git a/lib/icinga/macroprocessor.cpp b/lib/icinga/macroprocessor.cpp index 7fc150d94..2ac0ed89c 100644 --- a/lib/icinga/macroprocessor.cpp +++ b/lib/icinga/macroprocessor.cpp @@ -28,9 +28,7 @@ #include "base/scriptframe.hpp" #include "base/convert.hpp" #include "base/exception.hpp" -#include #include -#include using namespace icinga; @@ -94,8 +92,7 @@ bool MacroProcessor::ResolveMacro(const String& macro, const ResolverList& resol *recursive_macro = false; - std::vector tokens; - boost::algorithm::split(tokens, macro, boost::is_any_of(".")); + std::vector tokens = macro.Split("."); String objName; if (tokens.size() > 1) { diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp index b2f9fb6a2..93e2f7253 100644 --- a/lib/icinga/notification.cpp +++ b/lib/icinga/notification.cpp @@ -29,8 +29,6 @@ #include "base/exception.hpp" #include "base/initialize.hpp" #include "base/scriptglobal.hpp" -#include -#include using namespace icinga; @@ -61,8 +59,7 @@ String NotificationNameComposer::MakeName(const String& shortName, const Object: Dictionary::Ptr NotificationNameComposer::ParseName(const String& name) const { - std::vector tokens; - boost::algorithm::split(tokens, name, boost::is_any_of("!")); + std::vector tokens = name.Split("!"); if (tokens.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid Notification name.")); diff --git a/lib/icinga/pluginutility.cpp b/lib/icinga/pluginutility.cpp index 02eb27896..0dcc70997 100644 --- a/lib/icinga/pluginutility.cpp +++ b/lib/icinga/pluginutility.cpp @@ -26,8 +26,6 @@ #include "base/process.hpp" #include "base/objectlock.hpp" #include "base/exception.hpp" -#include -#include #include using namespace icinga; @@ -117,8 +115,7 @@ std::pair PluginUtility::ParseCheckOutput(const String& output) String text; String perfdata; - std::vector lines; - boost::algorithm::split(lines, output, boost::is_any_of("\r\n")); + std::vector lines = output.Split("\r\n"); for (const String& line : lines) { size_t delim = line.FindFirstOf("|"); diff --git a/lib/icinga/scheduleddowntime.cpp b/lib/icinga/scheduleddowntime.cpp index 53c036c78..d8120691f 100644 --- a/lib/icinga/scheduleddowntime.cpp +++ b/lib/icinga/scheduleddowntime.cpp @@ -29,8 +29,6 @@ #include "base/convert.hpp" #include "base/logger.hpp" #include "base/exception.hpp" -#include -#include #include using namespace icinga; @@ -58,8 +56,7 @@ String ScheduledDowntimeNameComposer::MakeName(const String& shortName, const Ob Dictionary::Ptr ScheduledDowntimeNameComposer::ParseName(const String& name) const { - std::vector tokens; - boost::algorithm::split(tokens, name, boost::is_any_of("!")); + std::vector tokens = name.Split("!"); if (tokens.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid ScheduledDowntime name.")); diff --git a/lib/icinga/service.cpp b/lib/icinga/service.cpp index c1e0149e5..ffbbedd2d 100644 --- a/lib/icinga/service.cpp +++ b/lib/icinga/service.cpp @@ -25,8 +25,6 @@ #include "base/objectlock.hpp" #include "base/convert.hpp" #include "base/utility.hpp" -#include -#include using namespace icinga; @@ -44,8 +42,7 @@ String ServiceNameComposer::MakeName(const String& shortName, const Object::Ptr& Dictionary::Ptr ServiceNameComposer::ParseName(const String& name) const { - std::vector tokens; - boost::algorithm::split(tokens, name, boost::is_any_of("!")); + std::vector tokens = name.Split("!"); if (tokens.size() < 2) BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid Service name.")); diff --git a/lib/livestatus/endpointstable.cpp b/lib/livestatus/endpointstable.cpp index 89443ef34..260916fa6 100644 --- a/lib/livestatus/endpointstable.cpp +++ b/lib/livestatus/endpointstable.cpp @@ -27,10 +27,8 @@ #include "base/objectlock.hpp" #include "base/convert.hpp" #include "base/utility.hpp" -#include #include #include -#include using namespace icinga; diff --git a/lib/livestatus/livestatuslogutility.cpp b/lib/livestatus/livestatuslogutility.cpp index b21caaa12..91db16253 100644 --- a/lib/livestatus/livestatuslogutility.cpp +++ b/lib/livestatus/livestatuslogutility.cpp @@ -29,8 +29,6 @@ #include "base/logger.hpp" #include #include -#include -#include #include #include #include @@ -142,8 +140,7 @@ Dictionary::Ptr LivestatusLogUtility::GetAttributes(const String& text) bag->Set("type", type); bag->Set("options", options); - std::vector tokens; - boost::algorithm::split(tokens, options, boost::is_any_of(";")); + std::vector tokens = options.Split(";"); /* set default values */ bag->Set("class", LogEntryClassInfo); diff --git a/lib/livestatus/livestatusquery.cpp b/lib/livestatus/livestatusquery.cpp index df3eb2ff1..376176918 100644 --- a/lib/livestatus/livestatusquery.cpp +++ b/lib/livestatus/livestatusquery.cpp @@ -41,9 +41,7 @@ #include "base/serializer.hpp" #include "base/timer.hpp" #include "base/initialize.hpp" -#include #include -#include #include using namespace icinga; @@ -122,11 +120,10 @@ LivestatusQuery::LivestatusQuery(const std::vector& lines, const String& m_KeepAlive = (params == "on"); else if (header == "Columns") { m_ColumnHeaders = false; // Might be explicitly re-enabled later on - boost::algorithm::split(m_Columns, params, boost::is_any_of(" ")); + m_Columns = params.Split(" "); } else if (header == "Separators") { - std::vector separators; + std::vector separators = params.Split(" "); - boost::algorithm::split(separators, params, boost::is_any_of(" ")); /* ugly ascii long to char conversion, but works */ if (separators.size() > 0) m_Separators[0] = String(1, static_cast(Convert::ToLong(separators[0]))); @@ -154,8 +151,7 @@ LivestatusQuery::LivestatusQuery(const std::vector& lines, const String& } else if (header == "Stats") { m_ColumnHeaders = false; // Might be explicitly re-enabled later on - std::vector tokens; - boost::algorithm::split(tokens, params, boost::is_any_of(" ")); + std::vector tokens = params.Split(" "); if (tokens.size() < 2) { m_Verb = "ERROR"; diff --git a/lib/livestatus/logtable.cpp b/lib/livestatus/logtable.cpp index df8ba859a..034dbb770 100644 --- a/lib/livestatus/logtable.cpp +++ b/lib/livestatus/logtable.cpp @@ -38,8 +38,6 @@ #include "base/objectlock.hpp" #include #include -#include -#include #include #include #include diff --git a/lib/livestatus/statehisttable.cpp b/lib/livestatus/statehisttable.cpp index e1a56c933..bb402580c 100644 --- a/lib/livestatus/statehisttable.cpp +++ b/lib/livestatus/statehisttable.cpp @@ -38,8 +38,6 @@ #include "base/objectlock.hpp" #include #include -#include -#include #include #include #include diff --git a/lib/methods/clrchecktask.cpp b/lib/methods/clrchecktask.cpp index f639ac47e..fdb47e554 100644 --- a/lib/methods/clrchecktask.cpp +++ b/lib/methods/clrchecktask.cpp @@ -27,8 +27,6 @@ #include "base/function.hpp" #include "base/utility.hpp" #include "base/process.hpp" -#include -#include #include #include #include diff --git a/lib/methods/pluginchecktask.cpp b/lib/methods/pluginchecktask.cpp index 4c35c7d60..18928fa20 100644 --- a/lib/methods/pluginchecktask.cpp +++ b/lib/methods/pluginchecktask.cpp @@ -28,8 +28,6 @@ #include "base/utility.hpp" #include "base/process.hpp" #include "base/convert.hpp" -#include -#include using namespace icinga; diff --git a/lib/perfdata/graphitewriter.cpp b/lib/perfdata/graphitewriter.cpp index bc2d64005..d878cf953 100644 --- a/lib/perfdata/graphitewriter.cpp +++ b/lib/perfdata/graphitewriter.cpp @@ -35,8 +35,6 @@ #include "base/exception.hpp" #include "base/statsfunction.hpp" #include -#include -#include #include #include diff --git a/lib/perfdata/influxdbwriter.cpp b/lib/perfdata/influxdbwriter.cpp index 4708d28ad..04153c3e8 100644 --- a/lib/perfdata/influxdbwriter.cpp +++ b/lib/perfdata/influxdbwriter.cpp @@ -40,8 +40,6 @@ #include "base/statsfunction.hpp" #include "base/tlsutility.hpp" #include -#include -#include #include #include #include diff --git a/lib/perfdata/opentsdbwriter.cpp b/lib/perfdata/opentsdbwriter.cpp index df37043ac..9d37fdc6c 100644 --- a/lib/perfdata/opentsdbwriter.cpp +++ b/lib/perfdata/opentsdbwriter.cpp @@ -36,8 +36,6 @@ #include "base/exception.hpp" #include "base/statsfunction.hpp" #include -#include -#include #include using namespace icinga; diff --git a/lib/remote/actionshandler.cpp b/lib/remote/actionshandler.cpp index 4ef93f17d..a8b31fc10 100644 --- a/lib/remote/actionshandler.cpp +++ b/lib/remote/actionshandler.cpp @@ -22,9 +22,7 @@ #include "remote/filterutility.hpp" #include "remote/apiaction.hpp" #include "base/exception.hpp" -#include "base/serializer.hpp" #include "base/logger.hpp" -#include #include using namespace icinga; diff --git a/lib/remote/apiaction.hpp b/lib/remote/apiaction.hpp index 9ae6b975c..96f8b4480 100644 --- a/lib/remote/apiaction.hpp +++ b/lib/remote/apiaction.hpp @@ -27,8 +27,6 @@ #include "base/configobject.hpp" #include #include -#include -#include namespace icinga { @@ -78,7 +76,7 @@ public: std::vector registerTypes; \ String typeNames = types; \ if (!typeNames.IsEmpty()) \ - boost::algorithm::split(registerTypes, typeNames, boost::is_any_of(";")); \ + registerTypes = typeNames.Split(";"); \ ApiAction::Ptr action = new ApiAction(registerTypes, callback); \ ApiActionRegistry::GetInstance()->Register(registerName, action); \ }) diff --git a/lib/remote/apilistener-configsync.cpp b/lib/remote/apilistener-configsync.cpp index ebdf60c51..067e2819c 100644 --- a/lib/remote/apilistener-configsync.cpp +++ b/lib/remote/apilistener-configsync.cpp @@ -25,8 +25,6 @@ #include "base/json.hpp" #include "base/convert.hpp" #include "config/vmops.hpp" -#include -#include #include using namespace icinga; @@ -319,8 +317,7 @@ void ApiListener::UpdateConfigObject(const ConfigObject::Ptr& object, const Mess if (original_attributes) { ObjectLock olock(original_attributes); for (const Dictionary::Pair& kv : original_attributes) { - std::vector tokens; - boost::algorithm::split(tokens, kv.first, boost::is_any_of(".")); + std::vector tokens = kv.first.Split("."); Value value = object; for (const String& token : tokens) { diff --git a/lib/remote/configobjectutility.cpp b/lib/remote/configobjectutility.cpp index 5cafca9bb..38fda3824 100644 --- a/lib/remote/configobjectutility.cpp +++ b/lib/remote/configobjectutility.cpp @@ -24,11 +24,9 @@ #include "config/configitem.hpp" #include "base/configwriter.hpp" #include "base/exception.hpp" -#include "base/serializer.hpp" #include "base/dependencygraph.hpp" -#include -#include #include +#include using namespace icinga; diff --git a/lib/remote/configpackageshandler.cpp b/lib/remote/configpackageshandler.cpp index 2d8be3c22..61c07b5be 100644 --- a/lib/remote/configpackageshandler.cpp +++ b/lib/remote/configpackageshandler.cpp @@ -22,7 +22,6 @@ #include "remote/httputility.hpp" #include "remote/filterutility.hpp" #include "base/exception.hpp" -#include using namespace icinga; diff --git a/lib/remote/configpackageutility.cpp b/lib/remote/configpackageutility.cpp index 9470d4b24..55fb8db78 100644 --- a/lib/remote/configpackageutility.cpp +++ b/lib/remote/configpackageutility.cpp @@ -20,7 +20,6 @@ #include "remote/configpackageutility.hpp" #include "base/application.hpp" #include "base/exception.hpp" -#include "base/scriptglobal.hpp" #include "base/utility.hpp" #include #include @@ -295,8 +294,7 @@ void ConfigPackageUtility::CollectPaths(const String& path, std::vector tokens; - boost::algorithm::split(tokens, path, boost::is_any_of("/\\")); + std::vector tokens = path.Split("/\\"); for (const String& part : tokens) { if (part == "..") diff --git a/lib/remote/configstageshandler.cpp b/lib/remote/configstageshandler.cpp index ecfc973c2..c564a8a77 100644 --- a/lib/remote/configstageshandler.cpp +++ b/lib/remote/configstageshandler.cpp @@ -23,7 +23,6 @@ #include "remote/filterutility.hpp" #include "base/application.hpp" #include "base/exception.hpp" -#include using namespace icinga; diff --git a/lib/remote/consolehandler.cpp b/lib/remote/consolehandler.cpp index d2cec89e7..79962cb50 100644 --- a/lib/remote/consolehandler.cpp +++ b/lib/remote/consolehandler.cpp @@ -28,7 +28,6 @@ #include "base/serializer.hpp" #include "base/timer.hpp" #include "base/initialize.hpp" -#include #include #include diff --git a/lib/remote/createobjecthandler.cpp b/lib/remote/createobjecthandler.cpp index 0cf505e28..ff90317af 100644 --- a/lib/remote/createobjecthandler.cpp +++ b/lib/remote/createobjecthandler.cpp @@ -25,7 +25,6 @@ #include "remote/apiaction.hpp" #include "remote/zone.hpp" #include "base/configtype.hpp" -#include #include using namespace icinga; diff --git a/lib/remote/deleteobjecthandler.cpp b/lib/remote/deleteobjecthandler.cpp index b631b6598..027f62fed 100644 --- a/lib/remote/deleteobjecthandler.cpp +++ b/lib/remote/deleteobjecthandler.cpp @@ -24,8 +24,7 @@ #include "remote/apiaction.hpp" #include "config/configitem.hpp" #include "base/exception.hpp" -#include "base/serializer.hpp" -#include +#include #include using namespace icinga; diff --git a/lib/remote/filterutility.cpp b/lib/remote/filterutility.cpp index fe3d03bda..f17c5e3d4 100644 --- a/lib/remote/filterutility.cpp +++ b/lib/remote/filterutility.cpp @@ -24,7 +24,7 @@ #include "base/json.hpp" #include "base/configtype.hpp" #include "base/logger.hpp" -#include +#include using namespace icinga; diff --git a/lib/remote/httprequest.cpp b/lib/remote/httprequest.cpp index 33fe195e1..546728d66 100644 --- a/lib/remote/httprequest.cpp +++ b/lib/remote/httprequest.cpp @@ -21,9 +21,6 @@ #include "base/logger.hpp" #include "base/application.hpp" #include "base/convert.hpp" -#include -#include -#include using namespace icinga; @@ -52,8 +49,7 @@ bool HttpRequest::Parse(StreamReadContext& src, bool may_wait) if (line == "") return true; - std::vector tokens; - boost::algorithm::split(tokens, line, boost::is_any_of(" ")); + std::vector tokens = line.Split(" "); Log(LogDebug, "HttpRequest") << "line: " << line << ", tokens: " << tokens.size(); if (tokens.size() != 3) diff --git a/lib/remote/httpresponse.cpp b/lib/remote/httpresponse.cpp index 68d77325f..2b6c9e99f 100644 --- a/lib/remote/httpresponse.cpp +++ b/lib/remote/httpresponse.cpp @@ -20,8 +20,6 @@ #include "remote/httpresponse.hpp" #include "remote/httpchunkedencoding.hpp" #include "base/logger.hpp" -#include -#include #include "base/application.hpp" #include "base/convert.hpp" @@ -132,8 +130,7 @@ bool HttpResponse::Parse(StreamReadContext& src, bool may_wait) if (line == "") return true; - std::vector tokens; - boost::algorithm::split(tokens, line, boost::is_any_of(" ")); + std::vector tokens = line.Split(" "); Log(LogDebug, "HttpRequest") << "line: " << line << ", tokens: " << tokens.size(); if (tokens.size() < 2) diff --git a/lib/remote/jsonrpcconnection.hpp b/lib/remote/jsonrpcconnection.hpp index 0d16606c8..db97f6fee 100644 --- a/lib/remote/jsonrpcconnection.hpp +++ b/lib/remote/jsonrpcconnection.hpp @@ -20,11 +20,11 @@ #ifndef JSONRPCCONNECTION_H #define JSONRPCCONNECTION_H +#include "remote/i2-remote.hpp" #include "remote/endpoint.hpp" #include "base/tlsstream.hpp" #include "base/timer.hpp" #include "base/workqueue.hpp" -#include "remote/i2-remote.hpp" namespace icinga { diff --git a/lib/remote/modifyobjecthandler.cpp b/lib/remote/modifyobjecthandler.cpp index 5e664eca3..893360671 100644 --- a/lib/remote/modifyobjecthandler.cpp +++ b/lib/remote/modifyobjecthandler.cpp @@ -22,8 +22,7 @@ #include "remote/filterutility.hpp" #include "remote/apiaction.hpp" #include "base/exception.hpp" -#include "base/serializer.hpp" -#include +#include #include using namespace icinga; diff --git a/lib/remote/objectqueryhandler.cpp b/lib/remote/objectqueryhandler.cpp index 8bb434a80..d85df022c 100644 --- a/lib/remote/objectqueryhandler.cpp +++ b/lib/remote/objectqueryhandler.cpp @@ -23,7 +23,7 @@ #include "base/serializer.hpp" #include "base/dependencygraph.hpp" #include "base/configtype.hpp" -#include +#include #include using namespace icinga; diff --git a/lib/remote/templatequeryhandler.cpp b/lib/remote/templatequeryhandler.cpp index d0bd35964..60584c0e7 100644 --- a/lib/remote/templatequeryhandler.cpp +++ b/lib/remote/templatequeryhandler.cpp @@ -24,7 +24,7 @@ #include "base/configtype.hpp" #include "base/scriptglobal.hpp" #include "base/logger.hpp" -#include +#include #include using namespace icinga; diff --git a/lib/remote/typequeryhandler.cpp b/lib/remote/typequeryhandler.cpp index 0f26d998f..e3f0c7257 100644 --- a/lib/remote/typequeryhandler.cpp +++ b/lib/remote/typequeryhandler.cpp @@ -23,7 +23,6 @@ #include "base/configtype.hpp" #include "base/scriptglobal.hpp" #include "base/logger.hpp" -#include #include using namespace icinga; diff --git a/lib/remote/variablequeryhandler.cpp b/lib/remote/variablequeryhandler.cpp index 512d3925a..7effbfb9c 100644 --- a/lib/remote/variablequeryhandler.cpp +++ b/lib/remote/variablequeryhandler.cpp @@ -24,7 +24,6 @@ #include "base/scriptglobal.hpp" #include "base/logger.hpp" #include "base/serializer.hpp" -#include #include using namespace icinga;