diff options
| author | Marc Mutz <marc.mutz@kdab.com> | 2015-04-05 21:01:54 +0200 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@kdab.com> | 2015-04-07 07:45:39 +0000 |
| commit | 414dd4bf127caa0729ce4ee73ce4a67bd3cd964e (patch) | |
| tree | 6a70f06ec87dcc68ab7ed021ef89106aaaa8f866 /src/tools/qdoc/cppcodeparser.h | |
| parent | 2d7128956fd2eb05ff8c98c0fd1dbe137913b77e (diff) | |
QErrorMessage: replace inefficient QQueue with std::queue
QQueue is-a QList, so it inherits the trait that types larger than
a void* cause a heap-allocation when inserted, which is horribly
inefficient.
Use a std::queue instead, which, by default, is backed by std::deque.
Requires rewriting the API calls, since QQueue uses non-standard
function names.
Text and data size increase negligibly (23 and 8 bytes, respectively),
even though we're instantiating a completely new type (std::deque)
instead of QList<QPair<QString, QString>>, which is probably still
used, despite the inefficiency.
Change-Id: I9bb04a2ec32bb1b9fa2eb83780f0aaa26e872d49
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/tools/qdoc/cppcodeparser.h')
0 files changed, 0 insertions, 0 deletions
