From: Francis Dupont Date: Sat, 17 Mar 2018 10:23:53 +0000 (+0100) Subject: [5533a] Changed remove to take a ConstHostPtr X-Git-Tag: trac5458a_base~38^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d4fde80a0310a12d5dc00ab8c472a5000a3e3fe8;p=thirdparty%2Fkea.git [5533a] Changed remove to take a ConstHostPtr --- diff --git a/src/lib/dhcpsrv/cache_host_data_source.h b/src/lib/dhcpsrv/cache_host_data_source.h index 72a899eb76..a063c7d0e5 100644 --- a/src/lib/dhcpsrv/cache_host_data_source.h +++ b/src/lib/dhcpsrv/cache_host_data_source.h @@ -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. /// diff --git a/src/lib/dhcpsrv/tests/host_cache_unittest.cc b/src/lib/dhcpsrv/tests/host_cache_unittest.cc index 35008f6575..8d0be16480 100644 --- a/src/lib/dhcpsrv/tests/host_cache_unittest.cc +++ b/src/lib/dhcpsrv/tests/host_cache_unittest.cc @@ -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()); }