summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2024-09-02 18:54:59 +0200
committerMarc Mutz <marc.mutz@qt.io>2024-09-03 09:51:01 +0200
commitaec8398d71d351e956683a695af51317fe65097e (patch)
tree38afe107850f155bfb99dd02e1cf8e96fe18ffd7 /src/corelib/kernel/qtimer.cpp
parent29dfcc240b3e29d5d6149c2996cfdb9d71b776bb (diff)
QDirListing: Extract Method next() from const_iterator::op++()
Having the actual const_iterator::operator++() as an out-of-line member function means that the implicit this pointer forces the object onto the stack (registers don't have addresses that could be passed). Since const_iterator is now merely a thinly-disguised pointer, that would cause terrible codegen. So, apply a technique originally developed for QStringView and make the operator an inline function that re-sets the member dirEntry using a call to a QDirListing static function that takes and returns by value. Passing by value enables passing in registers, which means the iterator object can now be a register value and doesn't require spilling to the stack to call the function. Found in API-review. Pick-to: 6.8 Change-Id: I9f4d5be5b72249b368ef3dea9d857178ca7e16aa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
0 files changed, 0 insertions, 0 deletions