Go to file
Marc Mutz 861574ebb6 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>
2014-02-01 15:51:17 +01:00
bin Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-15 22:39:25 +02:00
config.tests Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2014-01-21 17:57:54 +01:00
dist Merge remote-tracking branch 'origin/stable' into dev 2013-12-24 00:56:59 +01:00
doc Ask qdoc not to parse Q_DECL_UNUSED 2014-01-14 18:52:14 +01:00
examples Fix MSVC-warnings about double to float truncation. 2014-01-24 20:26:39 +01:00
lib
mkspecs Update the macro that MSVC 2013 defines for AVX code generation 2014-02-01 00:58:58 +01:00
qmake Fix configure & qmake compilation with a future MSVC version 2014-02-01 06:56:45 +01:00
src QGraphicsSceneIndex: replace polymorphism with a function pointer 2014-02-01 15:51:17 +01:00
tests Fix setWindowFlags() for QMdiSubWindow. 2014-02-01 15:50:26 +01:00
tools Fix configure & qmake compilation with a future MSVC version 2014-02-01 06:56:45 +01:00
util Introduce QChar::JoiningType enum and QChar::joiningType() method 2014-01-29 23:19:47 +01:00
.gitattributes Update the git-archive export options 2012-09-07 15:39:31 +02:00
.gitignore GitIgnore updates 2013-12-09 17:28:18 +01:00
.qmake.conf Enable -Werror for all of qtbase 2013-09-04 01:50:10 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
configure Make HarBuzz-NG the default shaper on Mac 2014-01-31 12:07:59 +01:00
configure.bat get rid of syncqt wrapper scripts 2013-05-13 21:54:48 +02:00
header.BSD Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.FDL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
header.LGPL-ONLY Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
INSTALL INSTALL: Fix URL of Installing Qt documentation 2013-04-11 16:09:07 +02:00
LGPL_EXCEPTION.txt Change copyrights from Nokia to Digia 2012-09-22 19:20:11 +02:00
LICENSE.FDL
LICENSE.GPL Add the LICENSE.GPL file to the module referenced from license headers 2012-05-20 22:41:08 +02:00
LICENSE.LGPL Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
LICENSE.PREVIEW.COMMERCIAL Update LICENSE.PREVIEW.COMMERCIAL license 2013-06-03 20:04:26 +02:00
qtbase.pro Merge remote-tracking branch 'origin/release' into stable 2013-12-05 17:42:33 +01:00
sync.profile generate qfeatures.h at build time 2013-10-29 15:37:58 +01:00