perf improvement

This commit is contained in:
Ken Martin 2003-06-05 15:28:51 -04:00
parent adbb5c5e79
commit 5c217cf83f
1 changed files with 2 additions and 2 deletions

View File

@ -1655,8 +1655,8 @@ cmSourceFile* cmMakefile::GetSource(const char* sourceName) const
for(std::vector<cmSourceFile*>::const_iterator i = m_SourceFiles.begin();
i != m_SourceFiles.end(); ++i)
{
if (cmSystemTools::GetFilenamePath((*i)->GetFullPath()) == path &&
(*i)->GetSourceName() == sname &&
if ((*i)->GetSourceName() == sname &&
cmSystemTools::GetFilenamePath((*i)->GetFullPath()) == path &&
(ext.size() == 0 || (ext == (*i)->GetSourceExtension())))
{
return *i;