diff options
author | Luca Di Sera <luca.disera@qt.io> | 2023-03-24 11:38:09 +0100 |
---|---|---|
committer | Luca Di Sera <luca.disera@qt.io> | 2023-03-27 12:44:45 +0200 |
commit | 2a3f531028e8c59a745d3fb90aecbed18cd759dd (patch) | |
tree | 6d5c0918a832e302fd5f54c14c155dc6d2e074c9 /src/qdoc/clangcodeparser.cpp | |
parent | 3e67f3d5538522efebf99855c1cd7c2eca3f61f9 (diff) | |
download | qttools-2a3f531028e8c59a745d3fb90aecbed18cd759dd.tar.gz |
QDoc: Flatten maps of source file in "main.cpp"
When QDoc runs it collects a series of input source files based on
certain configuration variables.
The collected input source files are later used as the base for
extracting the user-provided documentation.
The files are collected into a map, in `processQDocConfFile`,
`sources`.
The map uses the same values, file paths that QDoc extracted from the
above mentioned configuration variables, for each key-value pair.
That is, given a file path X, `sources` stores a key-value pair X-X.
Supposedly, the intention of using a map was to avoid duplicates.
Indeed, the code that populates the map avoid inserting elements that
already are present in the map, thus making use of the fast lookup that
the data structure provides.
As half of the map is left unused, indeed only the keys are ever
accessed, we replace the map with a set, which better provides the
required removal of duplicates.
Change-Id: If4de2f1a6c8b45ac138139b7d49b1d0d73ed2c1f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
0 files changed, 0 insertions, 0 deletions