From 51f8de810223139ea0dcb7bafcabe12fc8e075c1 Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Sun, 22 Feb 2015 13:48:30 +0100 Subject: [PATCH] if(): avoid one needless string compare for all if() statements If it's known that it is an "if" it can't be an "elseif". --- Source/cmIfCommand.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 3362abbb0..6dea5c17c 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -45,7 +45,7 @@ IsFunctionBlocked(const cmListFileFunction& lff, { this->ScopeDepth++; } - if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif")) + else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif")) { this->ScopeDepth--; // if this is the endif for this if statement, then start executing