diff options
author | Razvan Becheriu <razvan@isc.org> | 2024-01-12 15:31:50 +0100 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2024-01-22 16:49:59 +0100 |
commit | 1b4d7b0293bca6657d1f798e6e4e65ce95d2dca4 (patch) | |
tree | fc89d85f5dd097dd85a2921ce1382980e012a423 /src/lib/dhcpsrv/cfg_option.h | |
parent | [#3119] replace const auto with auto const (diff) | |
download | kea-1b4d7b0293bca6657d1f798e6e4e65ce95d2dca4.tar.xz kea-1b4d7b0293bca6657d1f798e6e4e65ce95d2dca4.zip |
[#3119] use range based for loop or BOOST_FOREACH
Diffstat (limited to 'src/lib/dhcpsrv/cfg_option.h')
-rw-r--r-- | src/lib/dhcpsrv/cfg_option.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/dhcpsrv/cfg_option.h b/src/lib/dhcpsrv/cfg_option.h index a0c6d0b68d..fd33d8df8b 100644 --- a/src/lib/dhcpsrv/cfg_option.h +++ b/src/lib/dhcpsrv/cfg_option.h @@ -14,6 +14,7 @@ #include <cc/user_context.h> #include <dhcpsrv/cfg_option_def.h> #include <dhcpsrv/key_from_key.h> +#include <boost/foreach.hpp> #include <boost/multi_index_container.hpp> #include <boost/multi_index/hashed_index.hpp> #include <boost/multi_index/ordered_index.hpp> @@ -516,7 +517,7 @@ public: /// there is no definition matching the option code in the given space, or /// if the definition factory invocation fails. static bool createDescriptorOption(CfgOptionDefPtr cfg_def, const std::string& space, - OptionDescriptor& opt_desc); + OptionDescriptor& opt_desc); /// @brief Merges this configuration to another configuration. /// @@ -646,9 +647,8 @@ public: const OptionContainerTypeIndex& idx = options->get<1>(); OptionContainerTypeRange range = idx.equal_range(option_code); // This code copies descriptors and can be optimized not doing this. - for (OptionContainerTypeIndex::const_iterator od_itr = range.first; - od_itr != range.second; ++od_itr) { - list.push_back(*od_itr); + BOOST_FOREACH(auto const& od_itr, range) { + list.push_back(od_itr); } return (list); |