aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypeloader.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-19 22:44:14 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 05:55:25 +0200
commit3ef88c539ff63d9cb33af71f44653b328f36d0db (patch)
tree207bd2f78b4d9614bd10f1949d27d9c711786d81 /src/qml/qml/qqmltypeloader.cpp
parent8ed38c70fd29680f7981d9d23581d46cf32139d0 (diff)
Use a handwritten offsetof macro
clang complains about our usage of offsetof(). What we do is not strictly c++98 compliant, but compliant with c++11. So replace the default offsetof with a handwritten macro to shut up clang until we can switch to c++11 mode for all compilers. Change-Id: Id724adb323ba9724ad5d7d9e0dba5a73b51af24f Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/qml/qml/qqmltypeloader.cpp')
-rw-r--r--src/qml/qml/qqmltypeloader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 23739de3fb..a705e00886 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -74,10 +74,10 @@
# define NAME_MAX _POSIX_SYMLINK_MAX
#endif
-// LSB has a broken version of offsetof that can't be used at compile time
+// LSB has a broken version of qOffsetOf that can't be used at compile time
// https://lsbbugs.linuxfoundation.org/show_bug.cgi?id=3462
-#undef offsetof
-#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
+#undef qOffsetOf
+#define qOffsetOf(TYPE, MEMBER) __builtin_qOffsetOf (TYPE, MEMBER)
#endif
// #define DATABLOB_DEBUG