Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
Kea
Commits
2ed60b95
Commit
2ed60b95
authored
Jan 04, 2013
by
Marcin Siodelski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2315] Minor code cleanup.
parent
c6e109f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
18 deletions
+4
-18
src/lib/dhcpsrv/cfgmgr.h
src/lib/dhcpsrv/cfgmgr.h
+1
-0
src/lib/dhcpsrv/subnet.cc
src/lib/dhcpsrv/subnet.cc
+3
-7
src/lib/dhcpsrv/subnet.h
src/lib/dhcpsrv/subnet.h
+0
-11
No files found.
src/lib/dhcpsrv/cfgmgr.h
View file @
2ed60b95
...
...
@@ -217,6 +217,7 @@ protected:
private:
/// A map containing option definitions for different option spaces.
/// The map key holds an option space name.
std
::
map
<
std
::
string
,
OptionDefContainer
>
option_def_spaces_
;
};
...
...
src/lib/dhcpsrv/subnet.cc
View file @
2ed60b95
...
...
@@ -62,12 +62,6 @@ Subnet::delOptions() {
option_spaces_
.
clear
();
}
const
Subnet
::
OptionContainer
&
Subnet
::
emptyOptionContainer
()
{
static
OptionContainer
container
;
return
(
container
);
}
const
Subnet
::
OptionContainer
&
Subnet
::
getOptions
(
const
std
::
string
&
option_space
)
const
{
// Search the map to get the options container for the particular
...
...
@@ -78,7 +72,9 @@ Subnet::getOptions(const std::string& option_space) const {
// has been configured for this option space yet. Thus we have to
// return an empty container to the caller.
if
(
options
==
option_spaces_
.
end
())
{
return
(
emptyOptionContainer
());
// The default constructor creates an empty container.
static
OptionContainer
container
;
return
(
container
);
}
// We found some option container for the option space specified.
// Let's return a const reference to it.
...
...
src/lib/dhcpsrv/subnet.h
View file @
2ed60b95
...
...
@@ -224,17 +224,6 @@ public:
/// @brief Delete all options configured for the subnet.
void
delOptions
();
/// @brief Return a reference to an empty option container.
///
/// The empty option container is returned when no other
/// suitable container can be found. For example, this is
/// the case when trying to get a set of options for the
/// particular option space that has no options configured
/// for the subnet.
///
/// @return reference to the empty option container.
static
const
OptionContainer
&
emptyOptionContainer
();
/// @brief checks if the specified address is in pools
///
/// Note the difference between inSubnet() and inPool(). For a given
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment