summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-31 13:47:44 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-31 13:47:45 +0200
commit883951928fc6d5c0d06c24a9a1790eeb805b1587 (patch)
tree243e00da0c28078f53fbb88d133582e5f475a9ec /src/corelib/global
parent3523c9e138dc8591619d21f24f60ded27bd7e7e3 (diff)
parent9e36747786b31c9494f99af5e1f7c977b51b7ce7 (diff)
Merge remote-tracking branch 'origin/release' into stable
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qendian.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index c9c4d23aab..9b939feea0 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -78,7 +78,10 @@ template <typename T> inline void qbswap(const T src, uchar *dest)
// If you want to avoid the memcopy, you must write specializations for this function
template <typename T> inline void qToUnaligned(const T src, uchar *dest)
{
- memcpy(dest, &src, sizeof(T));
+ // Using sizeof(T) inside memcpy function produces internal compiler error with
+ // MSVC2008/ARM in tst_endian -> use extra indirection to resolve size of T.
+ const size_t size = sizeof(T);
+ memcpy(dest, &src, size);
}
/* T qFromLittleEndian(const uchar *src)