summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-06-17 12:05:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-06-17 12:06:46 (GMT)
commit2c2c575383c049a312a9a276e195df6699364530 (patch)
tree130dd6b40c64fcb5c786a0df8b5dbe265c49dff7 /Source
parent24916ce81e1bd172a5d17450cab24282e6364819 (diff)
parent563205d6f84251dfef9658853e0b9a90af9ced71 (diff)
downloadCMake-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.cxx3
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