summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/index.cpp b/src/index.cpp
index cddd18f..1f425d4 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1410,17 +1410,19 @@ static void writeFileIndex(OutputList &ol)
QCString path=fd->getPath();
if (path.isEmpty()) path="[external]";
auto it = pathMap.find(path.str());
- if (it!=pathMap.end())
+ if (it!=pathMap.end()) // existing path -> append
{
outputFiles.at(it->second).files.push_back(fd.get());
}
- else
+ else // new path -> create path entry + append
{
pathMap.insert(std::make_pair(path.str(),outputFiles.size()));
outputFiles.emplace_back(path);
+ outputFiles.back().files.push_back(fd.get());
}
}
}
+
// sort the files by path
std::sort(outputFiles.begin(),
outputFiles.end(),