summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/cfg_hosts.cc
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2023-12-20 20:16:01 +0100
committerRazvan Becheriu <razvan@isc.org>2024-01-22 16:33:26 +0100
commit72f330320bd4e40c29a0c40d56bb9cba339dce12 (patch)
treecf43cf06d371f39036dc5cdcacc5c5f1e6fd09ed /src/lib/dhcpsrv/cfg_hosts.cc
parent[#3119] use auto const& whenever possible (diff)
downloadkea-72f330320bd4e40c29a0c40d56bb9cba339dce12.tar.xz
kea-72f330320bd4e40c29a0c40d56bb9cba339dce12.zip
[#3119] replace const auto with auto const
Diffstat (limited to 'src/lib/dhcpsrv/cfg_hosts.cc')
-rw-r--r--src/lib/dhcpsrv/cfg_hosts.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/dhcpsrv/cfg_hosts.cc b/src/lib/dhcpsrv/cfg_hosts.cc
index febf988285..bee54332bc 100644
--- a/src/lib/dhcpsrv/cfg_hosts.cc
+++ b/src/lib/dhcpsrv/cfg_hosts.cc
@@ -1100,7 +1100,7 @@ CfgHosts::del(const SubnetID& subnet_id, const asiolink::IOAddress& addr) {
HostContainer6Index1& idx6 = hosts6_.get<1>();
HostContainerIndex4& idx = hosts_.get<4>();
// Delete IPv6 reservations.
- const auto& range = idx6.equal_range(boost::make_tuple(subnet_id, addr));
+ auto const& range = idx6.equal_range(boost::make_tuple(subnet_id, addr));
erased_addresses = boost::distance(range);
// Delete hosts.
for (auto key = range.first; key != range.second; ++key) {
@@ -1136,10 +1136,10 @@ CfgHosts::del4(const SubnetID& subnet_id,
const uint8_t* identifier_begin,
const size_t identifier_len) {
HostContainerIndex0& idx = hosts_.get<0>();
- const auto t = boost::make_tuple(std::vector<uint8_t>(identifier_begin,
+ auto const t = boost::make_tuple(std::vector<uint8_t>(identifier_begin,
identifier_begin + identifier_len),
identifier_type);
- const auto& range = idx.equal_range(t);
+ auto const& range = idx.equal_range(t);
size_t erased = 0;
for (auto key = range.first; key != range.second;) {
if ((*key)->getIPv4SubnetID() != subnet_id) {
@@ -1186,10 +1186,10 @@ CfgHosts::del6(const SubnetID& subnet_id,
HostContainerIndex0& idx = hosts_.get<0>();
HostContainer6Index3& idx6 = hosts6_.get<3>();
- const auto t = boost::make_tuple(std::vector<uint8_t>(identifier_begin,
+ auto const t = boost::make_tuple(std::vector<uint8_t>(identifier_begin,
identifier_begin + identifier_len),
identifier_type);
- const auto& range = idx.equal_range(t);
+ auto const& range = idx.equal_range(t);
size_t erased_hosts = 0;
size_t erased_reservations = 0;
for (auto key = range.first; key != range.second;) {