Browse Source

Do not override contains() method which is present is STL

thegeorg 2 years ago
parent
commit
d114729045
2 changed files with 0 additions and 18 deletions
  1. 0 8
      util/generic/map.h
  2. 0 10
      util/generic/set.h

+ 0 - 8
util/generic/map.h

@@ -21,10 +21,6 @@ public:
     inline explicit operator bool() const noexcept {
         return !this->empty();
     }
-
-    inline bool contains(const K& key) const {
-        return this->find(key) != this->end();
-    }
 };
 
 template <class K, class V, class Less, class A>
@@ -37,8 +33,4 @@ public:
     inline explicit operator bool() const noexcept {
         return !this->empty();
     }
-
-    inline bool contains(const K& key) const {
-        return this->find(key) != this->end();
-    }
 };

+ 0 - 10
util/generic/set.h

@@ -18,11 +18,6 @@ public:
     inline explicit operator bool() const noexcept {
         return !this->empty();
     }
-
-    template <class TheKey>
-    inline bool contains(const TheKey& key) const {
-        return this->find(key) != this->end();
-    }
 };
 
 template <class K, class L, class A>
@@ -34,9 +29,4 @@ public:
     inline explicit operator bool() const noexcept {
         return !this->empty();
     }
-
-    template <class TheKey>
-    inline bool contains(const TheKey& key) const {
-        return this->find(key) != this->end();
-    }
 };