diff options
author | Brad King <brad.king@kitware.com> | 2023-05-22 17:17:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-22 21:14:54 (GMT) |
commit | 93ee2b369c8f2937d848026bad40b09586a5c487 (patch) | |
tree | 86a9b3cbdc529cea02b36190295bbf29a35806b0 /Source/cmGlobalCommonGenerator.cxx | |
parent | 7b3ec2b891d587828808845bfc390fb33aa120d9 (diff) | |
download | CMake-93ee2b369c8f2937d848026bad40b09586a5c487.zip CMake-93ee2b369c8f2937d848026bad40b09586a5c487.tar.gz CMake-93ee2b369c8f2937d848026bad40b09586a5c487.tar.bz2 |
Source: Fix -Wdangling-reference warnings exposed by gcc 13
Diffstat (limited to 'Source/cmGlobalCommonGenerator.cxx')
-rw-r--r-- | Source/cmGlobalCommonGenerator.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx index 7a44452..513e3bf 100644 --- a/Source/cmGlobalCommonGenerator.cxx +++ b/Source/cmGlobalCommonGenerator.cxx @@ -34,8 +34,8 @@ cmGlobalCommonGenerator::ComputeDirectoryTargets() const { std::map<std::string, DirectoryTarget> dirTargets; for (const auto& lg : this->LocalGenerators) { - std::string const& currentBinaryDir( - lg->GetStateSnapshot().GetDirectory().GetCurrentBinary()); + std::string currentBinaryDir = + lg->GetStateSnapshot().GetDirectory().GetCurrentBinary(); DirectoryTarget& dirTarget = dirTargets[currentBinaryDir]; dirTarget.LG = lg.get(); const std::vector<std::string>& configs = @@ -68,7 +68,7 @@ cmGlobalCommonGenerator::ComputeDirectoryTargets() const for (cmStateSnapshot dir = lg->GetStateSnapshot().GetBuildsystemDirectoryParent(); dir.IsValid(); dir = dir.GetBuildsystemDirectoryParent()) { - std::string const& d = dir.GetDirectory().GetCurrentBinary(); + std::string d = dir.GetDirectory().GetCurrentBinary(); dirTargets[d].Targets.emplace_back(t); } } |