From 54a70b3988d756cccf92773d86b38e3b2574758c Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Tue, 3 Aug 2021 17:14:04 +0300 Subject: Refactor: Move version compare op table out of the function It's static data and never changed. --- Source/cmConditionEvaluator.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 9485d04..415f667 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -59,6 +59,12 @@ auto const keyVERSION_GREATER_EQUAL = "VERSION_GREATER_EQUAL"_s; auto const keyVERSION_LESS = "VERSION_LESS"_s; auto const keyVERSION_LESS_EQUAL = "VERSION_LESS_EQUAL"_s; +cmSystemTools::CompareOp const MATCH2CMPOP[5] = { + cmSystemTools::OP_LESS, cmSystemTools::OP_LESS_EQUAL, + cmSystemTools::OP_GREATER, cmSystemTools::OP_GREATER_EQUAL, + cmSystemTools::OP_EQUAL +}; + // Run-Time to Compile-Time template selector template