diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2013-10-13 14:26:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-01 15:51:17 +0100 |
commit | 861574ebb634b73be917ad82926e4d6faa21607b (patch) | |
tree | a9c14ac424edf36afcd4c670047dbab9257c699b /src/network/ssl | |
parent | 5e99b07a072bedee239ed6980a44719da9ffa7c9 (diff) |
QGraphicsSceneIndex: replace polymorphism with a function pointer
QGraphicsSceneIndexIntersector was used as a kind of polymorpic predicate in
items_helper(). But it had only one function and the instances of it, which
were kept around in QGraphicsSceneIndexPrivate, were re-initialised on every
call to items_helper(), which means that one can just as well pass that
miniscule amount of data to the function itself.
Replaced the polymorphism with a function pointer and the comparison state
(which is conceptually const if it wasn't for the requirement to assign
to it all the time) with a const void * argument.
Effects on Linux AMD64 GCC 4.9-trunk release stripped:
text: -1584B
data: -376B
relocs: -26
I've wrapped the functions in a namespace. The only reason for this is
to keep the functions, previously defined in class bodies, at the same
indentation level so as not to destroy the git-blame history for them.
Change-Id: I8e1f48030047a3c54e881de7c77a3325b3e1f509
Reviewed-by: Alexis Menard <alexis@webkit.org>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Diffstat (limited to 'src/network/ssl')
0 files changed, 0 insertions, 0 deletions