]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5533a] Changed remove to take a ConstHostPtr
authorFrancis Dupont <fdupont@isc.org>
Sat, 17 Mar 2018 10:23:53 +0000 (11:23 +0100)
committerFrancis Dupont <fdupont@isc.org>
Sat, 17 Mar 2018 10:23:53 +0000 (11:23 +0100)
src/lib/dhcpsrv/cache_host_data_source.h
src/lib/dhcpsrv/tests/host_cache_unittest.cc

index 72a899eb7677f9439f664bd5b57974786c931961..a063c7d0e5a0c55f1f54808994b0f709c8eac86b 100644 (file)
@@ -40,7 +40,7 @@ public:
     ///
     /// @param host Pointer to the existing @c Host object being removed.
     /// @return true when found and removed.
-    virtual bool remove(const HostPtr& host) = 0;
+    virtual bool remove(const ConstHostPtr& host) = 0;
 
     /// @brief Flush entries.
     ///
index 35008f657507ac3fd0a3af03887cd84452e714c2..8d0be1648017762b3bb36a5041387a1f7ab1dab3 100644 (file)
@@ -55,7 +55,7 @@ public:
     }
 
     /// Remove
-    bool remove(const HostPtr& host) {
+    bool remove(const ConstHostPtr& host) {
         for (auto h = store_.begin(); h != store_.end(); ++h) {
             if (*h == host) {
                 store_.erase(h);
@@ -713,7 +713,7 @@ public:
     }
 
     /// Remove throws
-    bool remove(const HostPtr& host) {
+    bool remove(const ConstHostPtr& host) {
         isc_throw(NotImplemented,
                   "remove is not implemented: " << host->toText());
     }