summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@digia.com>2014-08-12 14:55:11 +0200
committerMaurice Kalinowski <maurice.kalinowski@digia.com>2014-08-13 09:41:09 +0200
commit6f482cd3b9d69635543e6decf1c4841f6dfb1578 (patch)
treecc5a1971e6cde0537cde2de9bbfa9b308e6f772b
parent03933809bbc65c6073d7d3a1709e7c1c31758e27 (diff)
downloadqtwebsockets-6f482cd3b9d69635543e6decf1c4841f6dfb1578.tar.gz
WinRT: Fix compiler crash (msvc2013 arm)
Visual Studio 2013 Update 3 ARM compiler has issues with the code path trying to optimize it. Instead of disabling optimization in general, use a pragma for the function. x86 compilation is fine though. Change-Id: If099f7d1400cb78958d10c2fd35daef3bb75fc91 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
-rw-r--r--src/websockets/qwebsocketframe.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/websockets/qwebsocketframe.cpp b/src/websockets/qwebsocketframe.cpp
index e48308f..8236498 100644
--- a/src/websockets/qwebsocketframe.cpp
+++ b/src/websockets/qwebsocketframe.cpp
@@ -312,6 +312,13 @@ bool QWebSocketFrame::isValid() const
return m_isValid;
}
+// The arm compiler of Visual Studio 2013 Update 3 crashes when
+// trying to optimize QWebSocketFrame::readFrame. Hence turn
+// those off for this snippet
+#if defined(Q_OS_WINPHONE) && defined(__ARM__)
+# pragma optimize("", off)
+#endif
+
#define WAIT_FOR_MORE_DATA(dataSizeInBytes) \
{ returnState = processingState; \
processingState = PS_WAIT_FOR_MORE_DATA; dataWaitSize = dataSizeInBytes; }
@@ -520,6 +527,10 @@ QWebSocketFrame QWebSocketFrame::readFrame(QIODevice *pIoDevice)
return frame;
}
+#if defined(Q_OS_WINPHONE) && defined(__ARM__)
+# pragma optimize("", on)
+#endif
+
/*!
\internal
*/