]> granicus.if.org Git - icinga2/commitdiff
Replace boost::tuple with std::tuple
authorGunnar Beutner <gunnar.beutner@icinga.com>
Wed, 22 Nov 2017 11:05:36 +0000 (12:05 +0100)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Thu, 30 Nov 2017 16:41:02 +0000 (17:41 +0100)
icinga-app/icinga.cpp
lib/base/object.hpp
lib/icinga/service.cpp
lib/icinga/service.hpp
lib/perfdata/elasticsearchwriter.cpp
lib/perfdata/graphitewriter.cpp
lib/perfdata/influxdbwriter.cpp
test/base-dictionary.cpp
test/base-json.cpp
test/base-serialize.cpp
test/base-type.cpp

index 8a36a9cbd11c8d0115c7323062493a4905349631..597961ecc710ad7f4d6ad093ea1cee3876a1a4d2 100644 (file)
@@ -34,7 +34,6 @@
 #include "base/process.hpp"
 #include "config.h"
 #include <boost/program_options.hpp>
-#include <boost/tuple/tuple.hpp>
 #include <thread>
 
 #ifndef _WIN32
index d3abc464814cf431c4e576c67745e50668f7c903..5418722c7dbbc1038d03575d6f148c8e747efb7c 100644 (file)
@@ -31,9 +31,6 @@ using boost::intrusive_ptr;
 using boost::dynamic_pointer_cast;
 using boost::static_pointer_cast;
 
-#include <boost/tuple/tuple.hpp>
-using boost::tie;
-
 namespace icinga
 {
 
index 54fa55eb4dfcc5eea87340440cdab3f5202645ca..4426b35d78571f40bc546a0ae23304409fa4f1bc 100644 (file)
@@ -267,13 +267,13 @@ bool Service::ResolveMacro(const String& macro, const CheckResult::Ptr& cr, Valu
        return false;
 }
 
-boost::tuple<Host::Ptr, Service::Ptr> icinga::GetHostService(const Checkable::Ptr& checkable)
+std::pair<Host::Ptr, Service::Ptr> icinga::GetHostService(const Checkable::Ptr& checkable)
 {
        Service::Ptr service = dynamic_pointer_cast<Service>(checkable);
 
        if (service)
-               return boost::make_tuple(service->GetHost(), service);
+               return std::make_pair(service->GetHost(), service);
        else
-               return boost::make_tuple(static_pointer_cast<Host>(checkable), Service::Ptr());
+               return std::make_pair(static_pointer_cast<Host>(checkable), Service::Ptr());
 }
 
index 8b689cd33e33d7e06259c207dcb2dd7cce428b7b..78bae56b577dd23da709a8465627106e7e39ac8b 100644 (file)
 #include "icinga/service.thpp"
 #include "icinga/macroresolver.hpp"
 #include "icinga/host.hpp"
+#include <utility>
+#include <tuple>
+
+using std::tie;
 
 namespace icinga
 {
@@ -68,7 +72,7 @@ private:
        static bool EvaluateApplyRule(const Host::Ptr& host, const ApplyRule& rule);
 };
 
-I2_ICINGA_API boost::tuple<Host::Ptr, Service::Ptr> GetHostService(const Checkable::Ptr& checkable);
+I2_ICINGA_API std::pair<Host::Ptr, Service::Ptr> GetHostService(const Checkable::Ptr& checkable);
 
 }
 
index 98c6c73578fd0c793a96614c958d51748f6ccf76..ce648cd54b5971829395e801a4199df612c0776a 100644 (file)
@@ -190,7 +190,7 @@ void ElasticsearchWriter::InternalCheckResultHandler(const Checkable::Ptr& check
 
        Host::Ptr host;
        Service::Ptr service;
-       boost::tie(host, service) = GetHostService(checkable);
+       tie(host, service) = GetHostService(checkable);
 
        Dictionary::Ptr fields = new Dictionary();
 
index 04aad230a720d86c36f5421e2ba310011a0ee64e..86611393cda0e1df3458a6a238f0bdb9430f7858 100644 (file)
@@ -195,7 +195,7 @@ void GraphiteWriter::CheckResultHandlerInternal(const Checkable::Ptr& checkable,
 
        Host::Ptr host;
        Service::Ptr service;
-       boost::tie(host, service) = GetHostService(checkable);
+       tie(host, service) = GetHostService(checkable);
 
        MacroProcessor::ResolverList resolvers;
        if (service)
index d40f88627d2d3f8876a0295e0001127fbd14cee6..dc8e48955bd1cb9d2b5ae5cb8931d2a4c5d59efe 100644 (file)
@@ -190,7 +190,7 @@ void InfluxdbWriter::InternalCheckResultHandler(const Checkable::Ptr& checkable,
 
        Host::Ptr host;
        Service::Ptr service;
-       boost::tie(host, service) = GetHostService(checkable);
+       tie(host, service) = GetHostService(checkable);
 
        MacroProcessor::ResolverList resolvers;
        if (service)
@@ -275,7 +275,7 @@ void InfluxdbWriter::SendPerfdata(const Dictionary::Ptr& tmpl, const Checkable::
        if (GetEnableSendMetadata()) {
                Host::Ptr host;
                Service::Ptr service;
-               boost::tie(host, service) = GetHostService(checkable);
+               tie(host, service) = GetHostService(checkable);
 
                Dictionary::Ptr fields = new Dictionary();
 
index dcfdbeabd8074824032afb38a9f513c427b35b6b..8d8177ebd345171ee3106dc7a89ab8e533f8864a 100644 (file)
@@ -21,7 +21,6 @@
 #include "base/objectlock.hpp"
 #include "base/json.hpp"
 #include <BoostTestTargetConfig.h>
-#include <boost/tuple/tuple.hpp>
 
 using namespace icinga;
 
index 48704f489eb578ced8d369ce362aa2101773c196..6f3adb025f905509f2294fa33e1ec8260118fc78 100644 (file)
@@ -21,7 +21,6 @@
 #include "base/objectlock.hpp"
 #include "base/json.hpp"
 #include <BoostTestTargetConfig.h>
-#include <boost/tuple/tuple.hpp>
 
 using namespace icinga;
 
index 4311e1f65dacfbc8577e635beb2dbd61f3222e8f..13bfacd2e2fcef7973ca383a71586e5b2633ea50 100644 (file)
@@ -24,7 +24,6 @@
 #include "base/array.hpp"
 #include "base/dictionary.hpp"
 #include <BoostTestTargetConfig.h>
-#include <boost/tuple/tuple.hpp>
 
 using namespace icinga;
 
index 08cca02df19ea8ee3f84fba6ad21a21a35f8e8aa..8d5a9c64aaf02bc25ba39f3e7d992892c0efaf34 100644 (file)
@@ -23,7 +23,6 @@
 #include "base/application.hpp"
 #include "base/type.hpp"
 #include <BoostTestTargetConfig.h>
-#include <boost/tuple/tuple.hpp>
 
 using namespace icinga;