Browse Source

[2157] avoid using unnamed namespace in header file

Yoshitaka Aharen 12 years ago
parent
commit
3476033eb7
2 changed files with 3 additions and 8 deletions
  1. 1 4
      src/lib/statistics/counter.h
  2. 2 4
      src/lib/statistics/counter_dict.h

+ 1 - 4
src/lib/statistics/counter.h

@@ -22,10 +22,6 @@
 
 #include <vector>
 
-namespace {
-const unsigned int InitialValue = 0;
-} // anonymous namespace
-
 namespace isc {
 namespace statistics {
 
@@ -36,6 +32,7 @@ public:
 
 private:
     std::vector<Counter::Value> counters_;
+    static const unsigned int InitialValue = 0;
 
 public:
     /// The constructor.

+ 2 - 4
src/lib/statistics/counter_dict.h

@@ -31,16 +31,14 @@
 #include <iterator>
 #include <utility>
 
-namespace {
-typedef boost::shared_ptr<isc::statistics::Counter> CounterPtr;
-typedef std::map<std::string, CounterPtr> DictionaryMap;
-}
 
 namespace isc {
 namespace statistics {
 
 class CounterDictionary : boost::noncopyable {
 private:
+    typedef boost::shared_ptr<isc::statistics::Counter> CounterPtr;
+    typedef std::map<std::string, CounterPtr> DictionaryMap;
     DictionaryMap dictionary_;
     std::vector<std::string> elements_;
     const size_t items_;