mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 06:55:16 +00:00
[2316] Passing option by reference as suggested in the review.
This commit is contained in:
@@ -97,7 +97,7 @@ Pool4Ptr Subnet4::getPool4(const isc::asiolink::IOAddress& hint /* = IOAddress("
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Subnet4::validateOption(OptionPtr option) const {
|
Subnet4::validateOption(const OptionPtr& option) const {
|
||||||
if (!option) {
|
if (!option) {
|
||||||
isc_throw(isc::BadValue, "option configured for subnet must not be NULL");
|
isc_throw(isc::BadValue, "option configured for subnet must not be NULL");
|
||||||
} else if (option->getUniverse() != Option::V4) {
|
} else if (option->getUniverse() != Option::V4) {
|
||||||
@@ -152,7 +152,7 @@ Pool6Ptr Subnet6::getPool6(const isc::asiolink::IOAddress& hint /* = IOAddress("
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Subnet6::validateOption(OptionPtr option) const {
|
Subnet6::validateOption(const OptionPtr& option) const {
|
||||||
if (!option) {
|
if (!option) {
|
||||||
isc_throw(isc::BadValue, "option configured for subnet must not be NULL");
|
isc_throw(isc::BadValue, "option configured for subnet must not be NULL");
|
||||||
} else if (option->getUniverse() != Option::V6) {
|
} else if (option->getUniverse() != Option::V6) {
|
||||||
|
@@ -255,7 +255,7 @@ protected:
|
|||||||
/// @brief Check if option is valid and can be added to a subnet.
|
/// @brief Check if option is valid and can be added to a subnet.
|
||||||
///
|
///
|
||||||
/// @param option option to be validated.
|
/// @param option option to be validated.
|
||||||
virtual void validateOption(OptionPtr option) const = 0;
|
virtual void validateOption(const OptionPtr& option) const = 0;
|
||||||
|
|
||||||
/// @brief subnet-id
|
/// @brief subnet-id
|
||||||
///
|
///
|
||||||
@@ -328,7 +328,7 @@ protected:
|
|||||||
/// @param option option to be validated.
|
/// @param option option to be validated.
|
||||||
///
|
///
|
||||||
/// @throw isc::BadValue if provided option is invalid.
|
/// @throw isc::BadValue if provided option is invalid.
|
||||||
virtual void validateOption(OptionPtr option) const;
|
virtual void validateOption(const OptionPtr& option) const;
|
||||||
|
|
||||||
/// @brief collection of pools in that list
|
/// @brief collection of pools in that list
|
||||||
Pool4Collection pools_;
|
Pool4Collection pools_;
|
||||||
@@ -396,7 +396,7 @@ protected:
|
|||||||
/// @param option option to be validated.
|
/// @param option option to be validated.
|
||||||
///
|
///
|
||||||
/// @throw isc::BadValue if provided option is invalid.
|
/// @throw isc::BadValue if provided option is invalid.
|
||||||
virtual void validateOption(OptionPtr option) const;
|
virtual void validateOption(const OptionPtr& option) const;
|
||||||
|
|
||||||
/// @brief collection of pools in that list
|
/// @brief collection of pools in that list
|
||||||
Pool6Collection pools_;
|
Pool6Collection pools_;
|
||||||
|
Reference in New Issue
Block a user