mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-05 04:03:22 +03:00
speedup: Cache strings for comparisons
This commit is contained in:
1 parent
7abf4e313d
commit
caaad35759
2 files changed
+4
-2
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user