2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 04:57:52 +00:00

[2316] Passing option by reference as suggested in the review.

This commit is contained in:
Marcin Siodelski 2012-10-24 10:57:39 +02:00
parent 6c12b4328d
commit 35300a55ab
2 changed files with 5 additions and 5 deletions

View File

@ -97,7 +97,7 @@ Pool4Ptr Subnet4::getPool4(const isc::asiolink::IOAddress& hint /* = IOAddress("
}
void
Subnet4::validateOption(OptionPtr option) const {
Subnet4::validateOption(const OptionPtr& option) const {
if (!option) {
isc_throw(isc::BadValue, "option configured for subnet must not be NULL");
} else if (option->getUniverse() != Option::V4) {
@ -152,7 +152,7 @@ Pool6Ptr Subnet6::getPool6(const isc::asiolink::IOAddress& hint /* = IOAddress("
}
void
Subnet6::validateOption(OptionPtr option) const {
Subnet6::validateOption(const OptionPtr& option) const {
if (!option) {
isc_throw(isc::BadValue, "option configured for subnet must not be NULL");
} else if (option->getUniverse() != Option::V6) {

View File

@ -255,7 +255,7 @@ protected:
/// @brief Check if option is valid and can be added to a subnet.
///
/// @param option option to be validated.
virtual void validateOption(OptionPtr option) const = 0;
virtual void validateOption(const OptionPtr& option) const = 0;
/// @brief subnet-id
///
@ -328,7 +328,7 @@ protected:
/// @param option option to be validated.
///
/// @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
Pool4Collection pools_;
@ -396,7 +396,7 @@ protected:
/// @param option option to be validated.
///
/// @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
Pool6Collection pools_;