diff options
author | Brad King <brad.king@kitware.com> | 2019-06-17 12:05:59 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-06-17 12:06:46 (GMT) |
commit | 2c2c575383c049a312a9a276e195df6699364530 (patch) | |
tree | 130dd6b40c64fcb5c786a0df8b5dbe265c49dff7 /Source | |
parent | 24916ce81e1bd172a5d17450cab24282e6364819 (diff) | |
parent | 563205d6f84251dfef9658853e0b9a90af9ced71 (diff) | |
download | CMake-2c2c575383c049a312a9a276e195df6699364530.zip CMake-2c2c575383c049a312a9a276e195df6699364530.tar.gz CMake-2c2c575383c049a312a9a276e195df6699364530.tar.bz2 |
Merge topic 'cmDefinitions_avoid_string_copy'
563205d6f8 cmDefinitions: Avoid string copy when setting a definition
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3443
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmDefinitions.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx index 5fafaf9..894447c 100644 --- a/Source/cmDefinitions.cxx +++ b/Source/cmDefinitions.cxx @@ -57,8 +57,7 @@ bool cmDefinitions::HasKey(const std::string& key, StackIter begin, void cmDefinitions::Set(const std::string& key, const char* value) { - Def def(value); - this->Map[key] = def; + this->Map[key] = Def(value); } std::vector<std::string> cmDefinitions::UnusedKeys() const |