From 6fd9b47d047e111b42b7ba6f1da5ea32910b1c2b Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 5 Feb 2018 22:02:33 +0000 Subject: [PATCH] Compile fix on 32-bit or non-windows with analytics enabled --- qrenderdoc/Code/Interface/Analytics.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/qrenderdoc/Code/Interface/Analytics.cpp b/qrenderdoc/Code/Interface/Analytics.cpp index 56740a042..6097d5815 100644 --- a/qrenderdoc/Code/Interface/Analytics.cpp +++ b/qrenderdoc/Code/Interface/Analytics.cpp @@ -37,6 +37,12 @@ #if RENDERDOC_ANALYTICS_ENABLE +template <> +inline const char *TypeName() +{ + return "int"; +} + template <> inline const char *TypeName() { @@ -314,7 +320,10 @@ void AnalyticsSerialise(Analytics &serdb, QVariantMap &values, AnalyticsSerialis { bool reporting = type == AnalyticsSerialiseType::Reporting; +// only check this on 64-bit as it is different on 32-bit +#if QT_POINTER_SIZE == 8 && defined(Q_OS_WIN32) static_assert(sizeof(Analytics) == 147, "Sizeof Analytics has changed - update serialisation."); +#endif QString doc;