Commit caaad357 authored by Ben Boeckel's avatar Ben Boeckel Committed by Brad King
Browse files

speedup: Cache strings for comparisons

parent 7abf4e31
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment