]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2432] solve warning: std::unary_function is deprecated
authorAndrei Pavel <andrei@isc.org>
Thu, 30 Jun 2022 14:07:19 +0000 (17:07 +0300)
committerTomek Mrugalski <tomek@isc.org>
Fri, 8 Jul 2022 14:06:05 +0000 (16:06 +0200)
src/lib/asiolink/tests/interval_timer_unittest.cc
src/lib/asiolink/testutils/timed_signal.h
src/lib/dns/message.cc
src/lib/dns/tests/masterload_unittest.cc

index 5b21b77848b779a67fd3ff8c9886ac0f292cd7d7..757bba4d4297df0ee8e4e35e45099333c9319ece 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2022 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -28,7 +28,7 @@ protected:
         io_service_(), timer_called_(false), timer_cancel_success_(false)
     {}
     ~IntervalTimerTest() {}
-    class TimerCallBack : public std::unary_function<void, void> {
+    class TimerCallBack {
     public:
         TimerCallBack(IntervalTimerTest* test_obj) : test_obj_(test_obj) {}
         void operator()() const {
@@ -39,7 +39,7 @@ protected:
     private:
         IntervalTimerTest* test_obj_;
     };
-    class TimerCallBackCounter : public std::unary_function<void, void> {
+    class TimerCallBackCounter {
     public:
         TimerCallBackCounter(IntervalTimerTest* test_obj) :
             test_obj_(test_obj)
@@ -54,7 +54,7 @@ protected:
     private:
         IntervalTimerTest* test_obj_;
     };
-    class TimerCallBackCancelDeleter : public std::unary_function<void, void> {
+    class TimerCallBackCancelDeleter {
     public:
         TimerCallBackCancelDeleter(IntervalTimerTest* test_obj,
                                    IntervalTimer* timer,
@@ -102,7 +102,7 @@ protected:
         unsigned int& counter_;
         IntervalTimer& itimer_;
     };
-    class TimerCallBackOverwriter : public std::unary_function<void, void> {
+    class TimerCallBackOverwriter {
     public:
         TimerCallBackOverwriter(IntervalTimerTest* test_obj,
                                 IntervalTimer& timer)
@@ -128,7 +128,7 @@ protected:
         IntervalTimer& timer_;
         int count_;
     };
-    class TimerCallBackAccumulator: public std::unary_function<void, void> {
+    class TimerCallBackAccumulator {
     public:
         TimerCallBackAccumulator(IntervalTimerTest* test_obj, int &counter) :
             test_obj_(test_obj), counter_(counter) {
index 3af545df387ca154ab36c6eb6bfa4ed56101bca7..f1cd0c977555e5ac23ad06f9b24c60d5a54da498 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2021 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2021-2022 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -51,7 +51,7 @@ public:
     }
 
     /// @brief Callback for the TimeSignal's internal timer.
-    class SendSignalCallback: public std::unary_function<void, void> {
+    class SendSignalCallback {
     public:
 
         /// @brief Constructor
index 1e7bb7b5944bb0a561932d4f30c196e7302ae36c..e46c68fc4779be06aba64591acf449f5ee8f6216 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2009-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2009-2022 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -682,7 +682,7 @@ MessageImpl::parseQuestion(InputBuffer& buffer) {
 }
 
 namespace {
-struct MatchRR : public unary_function<RRsetPtr, bool> {
+struct MatchRR {
     MatchRR(const Name& name, const RRType& rrtype, const RRClass& rrclass) :
         name_(name), rrtype_(rrtype), rrclass_(rrclass) {}
     bool operator()(const RRsetPtr& rrset) const {
index f5fd00fa33ac96e490a6871afecd4705b7dc4d69..e412de011a56601e1aaa6efcb251699951e9f896 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2020 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2010-2022 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -27,7 +27,7 @@ namespace ph = std::placeholders;
 
 namespace {
 // A callback functor for masterLoad() commonly used for the following tests.
-class TestCallback : public unary_function<ConstRRsetPtr, void> {
+class TestCallback {
 public:
     TestCallback(vector<ConstRRsetPtr>& rrsets) : rrsets_(rrsets) {}
     void operator()(ConstRRsetPtr rrset) {
@@ -362,7 +362,7 @@ TEST_F(MasterLoadTest, loadBadRRText) {
 
 // This is a helper callback to test the case the input stream becomes bad
 // in the middle of processing.
-class StreamInvalidator : public unary_function<ConstRRsetPtr, void> {
+class StreamInvalidator {
 public:
     StreamInvalidator(stringstream& ss) : ss_(ss) {}
     void operator()(ConstRRsetPtr) {