diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 5977d282b..a98458bae 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -157,10 +157,11 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj, std::map::iterator fileIt=m_fileCache.find(fullName); if (fileIt!=m_fileCache.end()) { - fileIt->second->used=true; + fileIt->second->m_Used=true; dependencies.insert(fullName); for (std::list::const_iterator incIt= - fileIt->second->list.begin(); incIt!=fileIt->second->list.end(); ++incIt) + fileIt->second->m_UnscannedEntries.begin(); + incIt!=fileIt->second->m_UnscannedEntries.end(); ++incIt) { if (m_Encountered.find(incIt->FileName) == m_Encountered.end()) { @@ -255,7 +256,7 @@ void cmDependsC::ReadCacheFile() { entry.QuotedLocation=line; } - cacheEntry->list.push_back(entry); + cacheEntry->m_UnscannedEntries.push_back(entry); } } } @@ -277,12 +278,13 @@ void cmDependsC::WriteCacheFile() const for (std::map::const_iterator fileIt=m_fileCache.begin(); fileIt!=m_fileCache.end(); ++fileIt) { - if (fileIt->second->used) + if (fileIt->second->m_Used) { cacheOut<first.c_str()<::const_iterator incIt=fileIt->second->list.begin(); - incIt!=fileIt->second->list.end(); ++incIt) + for (std::list::const_iterator + incIt=fileIt->second->m_UnscannedEntries.begin(); + incIt!=fileIt->second->m_UnscannedEntries.end(); ++incIt) { cacheOut<FileName.c_str()<QuotedLocation.empty()) @@ -303,7 +305,7 @@ void cmDependsC::WriteCacheFile() const void cmDependsC::Scan(std::istream& is, const char* directory, const cmStdString& fullName) { cmIncludeLines* newCacheEntry=new cmIncludeLines; - newCacheEntry->used=true; + newCacheEntry->m_Used=true; m_fileCache[fullName]=newCacheEntry; // Read one line at a time. @@ -334,7 +336,7 @@ void cmDependsC::Scan(std::istream& is, const char* directory, const cmStdString // preprocessor-like implementation of this scanner is created. if (m_IncludeRegexScan.find(entry.FileName.c_str())) { - newCacheEntry->list.push_back(entry); + newCacheEntry->m_UnscannedEntries.push_back(entry); if(m_Encountered.find(entry.FileName) == m_Encountered.end()) { m_Encountered.insert(entry.FileName); diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index e9d335f4a..f358fa3be 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -77,9 +77,9 @@ protected: struct cmIncludeLines { - cmIncludeLines():used(false) {} - std::list list; - bool used; + cmIncludeLines(): m_Used(false) {} + std::list m_UnscannedEntries; + bool m_Used; }; std::set m_Encountered;