summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-25 01:47:20 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:39 (GMT)
commitcaaad357598ec8c92f15ab0d682add9e70e2223c (patch)
tree07a0bd7ff0d915d6fe29d42724b271b0a18baddc /Source
parent7abf4e313d8e8d59c38f402efaf9cca4e4a2d3ba (diff)
downloadCMake-caaad357598ec8c92f15ab0d682add9e70e2223c.zip
CMake-caaad357598ec8c92f15ab0d682add9e70e2223c.tar.gz
CMake-caaad357598ec8c92f15ab0d682add9e70e2223c.tar.bz2
speedup: Cache strings for comparisons
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx3
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 4a59704..03f59c4 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -414,12 +414,13 @@ void cmExtraCodeBlocksGenerator
std::string lang = (*si)->GetLanguage();
if (lang == "C" || lang == "CXX")
{
+ std::string srcext = (*si)->GetExtension();
for(std::vector<std::string>::const_iterator
ext = mf->GetSourceExtensions().begin();
ext != mf->GetSourceExtensions().end();
++ext)
{
- if ((*si)->GetExtension() == *ext)
+ if (srcext == *ext)
{
isCFile = true;
break;
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 15fe8bb..5a9e125 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -223,12 +223,13 @@ void cmExtraCodeLiteGenerator
std::string lang = (*si)->GetLanguage();
if (lang == "C" || lang == "CXX")
{
+ std::string srcext = (*si)->GetExtension();
for(std::vector<std::string>::const_iterator
ext = mf->GetSourceExtensions().begin();
ext != mf->GetSourceExtensions().end();
++ext)
{
- if ((*si)->GetExtension() == *ext)
+ if (srcext == *ext)
{
isCFile = true;
break;