summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-02-10 09:14:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-27 12:57:02 +0100
commitbeab403d9fcf1fb41f3c133fc6d58e1e864a8d56 (patch)
treefa72affa7967706066308bb1af45f9630e23703c /tests/auto
parentdf055acc81f555011524a79cae3509669bbd0b8b (diff)
Reduce QtCore lib binary size by around ~3KB, by removing template code
Reusing a template is much better then creating a new one, even if it should inline the same code. For some reason replacing T* by void* force gcc to remove a few bytes per template instantiation too, it is not really significant, but it alows us to simplify the code. Benchmarks don't show any regressions. Change-Id: I4fdf1e4dc311b23021eb5758605602937d05b183 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/other/compiler/tst_compiler.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp
index 43e3788098..d72a04c8aa 100644
--- a/tests/auto/other/compiler/tst_compiler.cpp
+++ b/tests/auto/other/compiler/tst_compiler.cpp
@@ -268,9 +268,7 @@ namespace QtTestInternal
struct Getter {
static QMetaType::SaveOperator saveOp()
{
- typedef void(*SavePtr)(QDataStream &, const T *);
- SavePtr op = ::qMetaTypeSaveHelper<T>;
- return reinterpret_cast<QMetaType::SaveOperator>(op);
+ return ::qMetaTypeSaveHelper<T>;
}
};