Ver código fonte

cmDefinitions: Add an Erase method.

Stephen Kelly 10 anos atrás
pai
commit
60200ca508
2 arquivos alterados com 7 adições e 0 exclusões
  1. 5 0
      Source/cmDefinitions.cxx
  2. 2 0
      Source/cmDefinitions.h

+ 5 - 0
Source/cmDefinitions.cxx

@@ -61,6 +61,11 @@ void cmDefinitions::Set(const std::string& key, const char* value)
     }
 }
 
+void cmDefinitions::Erase(const std::string& key)
+{
+  this->Map.erase(key);
+}
+
 //----------------------------------------------------------------------------
 std::set<std::string> cmDefinitions::LocalKeys() const
 {

+ 2 - 0
Source/cmDefinitions.h

@@ -40,6 +40,8 @@ public:
   /** Set (or unset if null) a value associated with a key.  */
   void Set(const std::string& key, const char* value);
 
+  void Erase(const std::string& key);
+
   /** Get the set of all local keys.  */
   std::set<std::string> LocalKeys() const;