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.
This commit is contained in:
Brad King
2021-05-20 14:39:43 -04:00
parent fb3a57575a
commit efb8d7b4a1

View File

@@ -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);
}