diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-17 09:56:48 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2021-09-17 09:58:46 (GMT) |
commit | 7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4 (patch) | |
tree | 1af10b5267eb0f9821313bb3eb47900b2d205fe8 /Source/cmConditionEvaluator.cxx | |
parent | 241048d6ceb5dd4a16950c29286aebbcc46e565c (diff) | |
download | CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.zip CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.tar.gz CMake-7e154ebd59724d43bf29a8e1c648d6cf7f0e61e4.tar.bz2 |
cmSystemTools::VersionCompare: use std::string for arguments
Diffstat (limited to 'Source/cmConditionEvaluator.cxx')
-rw-r--r-- | Source/cmConditionEvaluator.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 68bc4d8..1d7696d 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -729,10 +729,9 @@ bool cmConditionEvaluator::HandleLevel2(cmArgumentList& newArgs, keyVERSION_LESS_EQUAL, keyVERSION_GREATER, keyVERSION_GREATER_EQUAL, keyVERSION_EQUAL))) { const auto op = MATCH2CMPOP[matchNo - 1]; - const cmProp lhs = this->GetVariableOrString(*args.current); - const cmProp rhs = this->GetVariableOrString(*args.nextnext); - const auto result = - cmSystemTools::VersionCompare(op, lhs->c_str(), rhs->c_str()); + const std::string& lhs = this->GetVariableOrString(*args.current); + const std::string& rhs = this->GetVariableOrString(*args.nextnext); + const auto result = cmSystemTools::VersionCompare(op, lhs, rhs); newArgs.ReduceTwoArgs(result, args); } |