Commit 35300a55 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

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

parent 6c12b432
......@@ -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) {
......
......@@ -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_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment