From efb8d7b4a1d82f2ce4bb01f200367679a6dc46c4 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 20 May 2021 14:39:43 -0400 Subject: [PATCH] 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. --- Source/cmNinjaTargetGenerator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }