BIND 10 trac2315, updated. 2ed60b95b8cbdff758e08062fc82c8d8f7b367ac [2315] Minor code cleanup.

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Jan 4 09:13:21 UTC 2013


The branch, trac2315 has been updated
       via  2ed60b95b8cbdff758e08062fc82c8d8f7b367ac (commit)
      from  c6e109f7d68347703baa542d0a913e97394b8057 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2ed60b95b8cbdff758e08062fc82c8d8f7b367ac
Author: Marcin Siodelski <marcin at isc.org>
Date:   Fri Jan 4 10:13:12 2013 +0100

    [2315] Minor code cleanup.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dhcpsrv/cfgmgr.h  |    1 +
 src/lib/dhcpsrv/subnet.cc |   10 +++-------
 src/lib/dhcpsrv/subnet.h  |   11 -----------
 3 files changed, 4 insertions(+), 18 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dhcpsrv/cfgmgr.h b/src/lib/dhcpsrv/cfgmgr.h
index 48fb027..87e3ad6 100644
--- a/src/lib/dhcpsrv/cfgmgr.h
+++ b/src/lib/dhcpsrv/cfgmgr.h
@@ -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_;
 };
 
diff --git a/src/lib/dhcpsrv/subnet.cc b/src/lib/dhcpsrv/subnet.cc
index 5e6186c..70e762e 100644
--- a/src/lib/dhcpsrv/subnet.cc
+++ b/src/lib/dhcpsrv/subnet.cc
@@ -63,12 +63,6 @@ Subnet::delOptions() {
 }
 
 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
     // option space.
@@ -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.
diff --git a/src/lib/dhcpsrv/subnet.h b/src/lib/dhcpsrv/subnet.h
index c2cdfb8..2941c01 100644
--- a/src/lib/dhcpsrv/subnet.h
+++ b/src/lib/dhcpsrv/subnet.h
@@ -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



More information about the bind10-changes mailing list