summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcontiguouscache.h
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2012-03-12 17:14:48 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-23 19:43:00 +0100
commitaccfdc85e5cb1816b3eda02ec8d37474259c247e (patch)
treee2c0369b07eaac3982f155adc8890532e6799e0a /src/corelib/tools/qcontiguouscache.h
parent98c3b8a44220096a4e2a3967a4e9742c3605a5cd (diff)
Fallback implementation of Q_ALIGNOF
For all practical purposes, the fallback introduced here returns the desired value. Having a fallback enables unconditional use of Q_ALIGNOF. For compilers that provide native support for it, Q_ALIGNOF is otherwise #defined in qcompilerdetection.h. Change-Id: Ie148ca8936cbbf8b80fe87771a14797c39a9d30c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qcontiguouscache.h')
-rw-r--r--src/corelib/tools/qcontiguouscache.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
index 4dc763f35d..4e01d7b586 100644
--- a/src/corelib/tools/qcontiguouscache.h
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -170,11 +170,7 @@ private:
}
int alignOfTypedData() const
{
-#ifdef Q_ALIGNOF
return qMax<int>(sizeof(void*), Q_ALIGNOF(Data));
-#else
- return 0;
-#endif
}
};