Browse Source

[2157] use common idiom to check an element exists

Yoshitaka Aharen 12 years ago
parent
commit
722fbab9dc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/statistics/counter_dict.h

+ 1 - 1
src/lib/statistics/counter_dict.h

@@ -72,7 +72,7 @@ public:
     ///                              already exists
     void addElement(const std::string& name) {
         // throw if the element already exists
-        if (dictionary_.count(name) != 0) {
+        if (dictionary_.find(name) != dictionary_.end()) {
             isc_throw(isc::InvalidParameter,
                       "Element " << name << " already exists");
         }