Commit 79f0ab18 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by hjk

C++: Clear state in DependencyTable::build

...since build() is called multiple times for e.g. the global snapshot
(CppModelManager::projectPartFromDependencies,
CppModelManager::replaceDocument).

Change-Id: I03667496a5abc984ba976046dc7b76998a6e3336
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 1af0f77e
......@@ -52,6 +52,12 @@ QStringList DependencyTable::filesDependingOn(const QString &fileName) const
void DependencyTable::build(const Snapshot &snapshot)
{
includesPerFile.clear();
files.clear();
fileIndex.clear();
includes.clear();
includeMap.clear();
const int documentCount = snapshot.size();
files.resize(documentCount);
includeMap.resize(documentCount);
......
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