861574ebb6
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> |
||
---|---|---|
bin | ||
config.tests | ||
dist | ||
doc | ||
examples | ||
lib | ||
mkspecs | ||
qmake | ||
src | ||
tests | ||
tools | ||
util | ||
.gitattributes | ||
.gitignore | ||
.qmake.conf | ||
.tag | ||
configure | ||
configure.bat | ||
header.BSD | ||
header.FDL | ||
header.LGPL | ||
header.LGPL-ONLY | ||
INSTALL | ||
LGPL_EXCEPTION.txt | ||
LICENSE.FDL | ||
LICENSE.GPL | ||
LICENSE.LGPL | ||
LICENSE.PREVIEW.COMMERCIAL | ||
qtbase.pro | ||
sync.profile |