From 60200ca5088058c70282500994727f2017276df8 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 25 Apr 2015 16:33:26 +0200 Subject: cmDefinitions: Add an Erase method. --- Source/cmDefinitions.cxx | 5 +++++ Source/cmDefinitions.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index abb46b3..58500c9 100644 --- a/Source/cmDefinitions.cxx +++ b/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 cmDefinitions::LocalKeys() const { diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index 83cd0d9..13f885d 100644 --- a/Source/cmDefinitions.h +++ b/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 LocalKeys() const; -- cgit v0.12