From accfdc85e5cb1816b3eda02ec8d37474259c247e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Mon, 12 Mar 2012 17:14:48 +0100 Subject: 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 Reviewed-by: Thiago Macieira --- src/corelib/tools/qhash.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/corelib/tools/qhash.h') diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 73162b6cf1..ef003c8a71 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -257,13 +257,8 @@ class QHash return reinterpret_cast(node); } -#ifdef Q_ALIGNOF static inline int alignOfNode() { return qMax(sizeof(void*), Q_ALIGNOF(Node)); } static inline int alignOfDummyNode() { return qMax(sizeof(void*), Q_ALIGNOF(DummyNode)); } -#else - static inline int alignOfNode() { return 0; } - static inline int alignOfDummyNode() { return 0; } -#endif public: inline QHash() : d(const_cast(&QHashData::shared_null)) { } -- cgit v1.2.3