From 563205d6f84251dfef9658853e0b9a90af9ced71 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Thu, 13 Jun 2019 12:01:08 +0200 Subject: cmDefinitions: Avoid string copy when setting a definition --- Source/cmDefinitions.cxx | 3 +-- 1 file changed, 1 insertion(+), 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 cmDefinitions::UnusedKeys() const -- cgit v0.12