summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/network.h
diff options
context:
space:
mode:
authorFrancis Dupont <fdupont@isc.org>2020-12-04 12:00:11 +0100
committerFrancis Dupont <fdupont@isc.org>2020-12-09 15:14:06 +0100
commit576d360a389ebf8b2d1e6094604b5d59d99d7df1 (patch)
tree9d89de81a8e0e2ff0cd7df52d670b43d35fe47a7 /src/lib/dhcpsrv/network.h
parent[#1456] Added no regression test (diff)
downloadkea-576d360a389ebf8b2d1e6094604b5d59d99d7df1.tar.xz
kea-576d360a389ebf8b2d1e6094604b5d59d99d7df1.zip
[#1456] Addressed comments
Diffstat (limited to 'src/lib/dhcpsrv/network.h')
-rw-r--r--src/lib/dhcpsrv/network.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/dhcpsrv/network.h b/src/lib/dhcpsrv/network.h
index dd1ee9a67b..4166eb34fa 100644
--- a/src/lib/dhcpsrv/network.h
+++ b/src/lib/dhcpsrv/network.h
@@ -794,7 +794,7 @@ protected:
/// @note: use overloading vs specialization because full specialization
/// is not allowed in this scope.
///
- /// @tparam IntType Type of the encapsulated value(s).
+ /// @tparam NumType Type of the encapsulated value(s).
///
/// @param property Value to be returned when it is specified or when
/// no global value is found.
@@ -805,8 +805,8 @@ protected:
///
/// @return Optional value fetched from the global level or the value
/// of @c property.
- template<typename IntType>
- Triplet<IntType> getGlobalProperty(Triplet<IntType> property,
+ template<typename NumType>
+ Triplet<NumType> getGlobalProperty(Triplet<NumType> property,
const std::string& global_name,
bool triplet) const {
if (!global_name.empty() && fetch_globals_fn_) {
@@ -814,23 +814,23 @@ protected:
if (globals && (globals->getType() == data::Element::map)) {
data::ConstElementPtr param = globals->get(global_name);
if (param) {
- IntType def_value = static_cast<IntType>(param->intValue());
+ NumType def_value = static_cast<NumType>(param->intValue());
if (!triplet) {
return (def_value);
} else {
- IntType min_value = def_value;
- IntType max_value = def_value;
+ NumType min_value = def_value;
+ NumType max_value = def_value;
const std::string& min_name = "min-" + global_name;
data::ConstElementPtr min_param = globals->get(min_name);
if (min_param) {
- min_value = static_cast<IntType>(min_param->intValue());
+ min_value = static_cast<NumType>(min_param->intValue());
}
const std::string& max_name = "max-" + global_name;
data::ConstElementPtr max_param = globals->get(max_name);
- if (min_param) {
- min_value = static_cast<IntType>(min_param->intValue());
+ if (max_param) {
+ max_value = static_cast<NumType>(max_param->intValue());
}
- return (Triplet<IntType>(min_value, def_value, max_value));
+ return (Triplet<NumType>(min_value, def_value, max_value));
}
}
}