summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qvector.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/qvector.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/qvector.h')
-rw-r--r--src/corelib/tools/qvector.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 226d0bb258..04ab9e6e80 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -331,11 +331,7 @@ private:
}
static Q_DECL_CONSTEXPR int alignOfTypedData()
{
-#ifdef Q_ALIGNOF
return Q_ALIGNOF(AlignmentDummy);
-#else
- return sizeof(void *);
-#endif
}
};