diff options
author | Brad King <brad.king@kitware.com> | 2023-03-18 15:19:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-18 15:52:41 (GMT) |
commit | f79817fcf0168c377ea4cb7187830a8caf373168 (patch) | |
tree | 0531bff85b3fd916cd692b62143ccfedc9b5a27f /Source/cmCxxModuleMapper.h | |
parent | 5ab002ea11921c4766912cfa7ca98756271f87dc (diff) | |
download | CMake-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/cmCxxModuleMapper.h')
-rw-r--r-- | Source/cmCxxModuleMapper.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCxxModuleMapper.h b/Source/cmCxxModuleMapper.h index 9271978..0f453b0 100644 --- a/Source/cmCxxModuleMapper.h +++ b/Source/cmCxxModuleMapper.h @@ -30,7 +30,7 @@ struct CxxModuleLocations std::string RootDirectory; // A function to convert a full path to a path for the generator. - std::function<std::string(std::string const&)> PathForGenerator; + std::function<std::string(std::string)> PathForGenerator; // Lookup the BMI location of a logical module name. std::function<cm::optional<std::string>(std::string const&)> |