summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-05-20 14:39:43 -0400
committerBrad King <brad.king@kitware.com>2021-05-25 10:48:25 -0400
commitefb8d7b4a1d82f2ce4bb01f200367679a6dc46c4 (patch)
tree156b15d6704ee09afb013440dd0d26292cc7859d /Source
parentfb3a57575aa91c636963a12b7d0b6ec64bfce241 (diff)
downloadcmake-efb8d7b4a1d82f2ce4bb01f200367679a6dc46c4.tar.gz
cmNinjaTargetGenerator: Reduce string copies in ConvertToNinjaPath wrapper
The global generator's method returns a reference to a cached value. Return that from the wrapper too.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaTargetGenerator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.h b/Source/cmNinjaTargetGenerator.h
index 72f6b5f224..daf7817620 100644
--- a/Source/cmNinjaTargetGenerator.h
+++ b/Source/cmNinjaTargetGenerator.h
@@ -101,7 +101,7 @@ protected:
const std::string& language,
const std::string& config);
- std::string ConvertToNinjaPath(const std::string& path) const
+ std::string const& ConvertToNinjaPath(const std::string& path) const
{
return this->GetGlobalGenerator()->ConvertToNinjaPath(path);
}