Browse Source

[4204fd] Remade option_universe_ private

Francis Dupont 9 years ago
parent
commit
efb9dab922

+ 2 - 2
src/lib/eval/eval_context.cc

@@ -22,8 +22,8 @@
 #include <fstream>
 
 EvalContext::EvalContext(const Option::Universe& option_universe)
-  : option_universe_(option_universe),
-    trace_scanning_(false), trace_parsing_(false)
+  : trace_scanning_(false), trace_parsing_(false),
+    option_universe_(option_universe)
 {
 }
 

+ 6 - 6
src/lib/eval/eval_context.h

@@ -104,12 +104,6 @@ public:
     uint16_t convert_option_name(const std::string& option_name,
                                  const isc::eval::location& loc);
 
-    /// @brief Option universe: DHCPv4 or DHCPv6.
-    ///
-    /// This is used by the parser to determine which option definitions
-    /// set should be used to map option name to option code.
-    Option::Universe option_universe_;
-
  private:
     /// @brief Flag determining scanner debugging.
     bool trace_scanning_;
@@ -117,6 +111,12 @@ public:
     /// @brief Flag determing parser debugging.
     bool trace_parsing_;
 
+    /// @brief Option universe: DHCPv4 or DHCPv6.
+    ///
+    /// This is used by the parser to determine which option definitions
+    /// set should be used to map option name to option code.
+    Option::Universe option_universe_;
+
 };
 
 }; // end of isc::eval namespace

+ 3 - 4
src/lib/eval/tests/context_unittest.cc

@@ -32,10 +32,9 @@ namespace {
 class EvalContextTest : public ::testing::Test {
 public:
     /// @brief constructor to initialize members
-    EvalContextTest() : ::testing::Test() {
-        parsed_ = false;
-        universe_ = Option::V4;
-    }
+    EvalContextTest() : ::testing::Test(),
+    universe_(Option::V4), parsed_(false)
+    { }
 
     /// @brief checks if the given token is a string with the expected value
     void checkTokenString(const TokenPtr& token, const std::string& expected) {