summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-18 15:19:28 (GMT)
committerBrad King <brad.king@kitware.com>2023-03-18 15:52:41 (GMT)
commitf79817fcf0168c377ea4cb7187830a8caf373168 (patch)
tree0531bff85b3fd916cd692b62143ccfedc9b5a27f /Source/cmGlobalNinjaGenerator.cxx
parent5ab002ea11921c4766912cfa7ca98756271f87dc (diff)
downloadCMake-f79817fcf0168c377ea4cb7187830a8caf373168.zip
CMake-f79817fcf0168c377ea4cb7187830a8caf373168.tar.gz
CMake-f79817fcf0168c377ea4cb7187830a8caf373168.tar.bz2
cmCxxModuleMapper: Use value semantics in path conversion callback
The call site already owns a path it doesn't need when the callback returns. Hand ownership to the callback so it can optionally mutate the path without necessarily allocating.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 9db92c0..e739038 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -2629,7 +2629,7 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
{
CxxModuleLocations locs;
locs.RootDirectory = ".";
- locs.PathForGenerator = [this](std::string const& path) -> std::string {
+ locs.PathForGenerator = [this](std::string path) -> std::string {
return this->ConvertToNinjaPath(path);
};
locs.BmiLocationForModule =