summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0c9e8f0..5ef63a3 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -799,12 +799,10 @@ std::vector<cmSourceFile*> const& cmTarget::GetSourceFiles()
void cmTarget::AddSourceFile(cmSourceFile* sf)
{
typedef cmTargetInternals::SourceEntriesType SourceEntriesType;
- SourceEntriesType::iterator i = this->Internal->SourceEntries.find(sf);
- if(i == this->Internal->SourceEntries.end())
+ if (std::find(this->SourceFiles.begin(), this->SourceFiles.end(), sf)
+ == this->SourceFiles.end())
{
typedef cmTargetInternals::SourceEntry SourceEntry;
- SourceEntriesType::value_type entry(sf, SourceEntry());
- i = this->Internal->SourceEntries.insert(entry).first;
this->SourceFiles.push_back(sf);
}
}