summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.cxx
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2015-02-22 12:48:30 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2015-02-22 12:48:30 (GMT)
commit51f8de810223139ea0dcb7bafcabe12fc8e075c1 (patch)
treeff0b3cc336e5ed59a8a70f7fe6b9f868b1638080 /Source/cmIfCommand.cxx
parent5cf629c3bc0c7a15d363d6d60e8c3cc04c0618f2 (diff)
downloadCMake-51f8de810223139ea0dcb7bafcabe12fc8e075c1.zip
CMake-51f8de810223139ea0dcb7bafcabe12fc8e075c1.tar.gz
CMake-51f8de810223139ea0dcb7bafcabe12fc8e075c1.tar.bz2
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".
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r--Source/cmIfCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 3362abb..6dea5c1 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