summaryrefslogtreecommitdiffstats
path: root/Source/cmConditionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-22 17:17:41 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-22 21:14:54 (GMT)
commit93ee2b369c8f2937d848026bad40b09586a5c487 (patch)
tree86a9b3cbdc529cea02b36190295bbf29a35806b0 /Source/cmConditionEvaluator.cxx
parent7b3ec2b891d587828808845bfc390fb33aa120d9 (diff)
downloadCMake-93ee2b369c8f2937d848026bad40b09586a5c487.zip
CMake-93ee2b369c8f2937d848026bad40b09586a5c487.tar.gz
CMake-93ee2b369c8f2937d848026bad40b09586a5c487.tar.bz2
Source: Fix -Wdangling-reference warnings exposed by gcc 13
Diffstat (limited to 'Source/cmConditionEvaluator.cxx')
-rw-r--r--Source/cmConditionEvaluator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 288e107..6f9f541 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -741,8 +741,8 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs,
keyVERSION_LESS_EQUAL, keyVERSION_GREATER,
keyVERSION_GREATER_EQUAL, keyVERSION_EQUAL))) {
const auto op = MATCH2CMPOP[matchNo - 1];
- const std::string& lhs = this->GetVariableOrString(*args.current);
- const std::string& rhs = this->GetVariableOrString(*args.nextnext);
+ const cmValue lhs = this->GetVariableOrString(*args.current);
+ const cmValue rhs = this->GetVariableOrString(*args.nextnext);
const auto result = cmSystemTools::VersionCompare(op, lhs, rhs);
newArgs.ReduceTwoArgs(result, args);
}