diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-03-13 18:39:03 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-03-13 19:27:21 +0000 |
commit | 59a3ca679ede2cb9b6a162edf8eba5cf6d9af4a9 (patch) | |
tree | 0d0f76caa042db299cddaa84c14c28e4c80b2ffd /src/corelib/json/qjson_p.h | |
parent | 447a508d003ce487f2be69af9ab05aeec272e64d (diff) | |
parent | 50d0f57b77b8088875d7185c5906b5f57985d5fb (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/corelib/json/qjson_p.h')
-rw-r--r-- | src/corelib/json/qjson_p.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/json/qjson_p.h b/src/corelib/json/qjson_p.h index 4c628ff1fe..e5010c2da7 100644 --- a/src/corelib/json/qjson_p.h +++ b/src/corelib/json/qjson_p.h @@ -151,6 +151,13 @@ public: return *this; } }; +} // namespace QJsonPrivate + +template <typename T> +class QTypeInfo<QJsonPrivate::q_littleendian<T> > + : public QTypeInfoMerger<QJsonPrivate::q_littleendian<T>, T> {}; + +namespace QJsonPrivate { typedef q_littleendian<short> qle_short; typedef q_littleendian<unsigned short> qle_ushort; @@ -402,7 +409,7 @@ public: // pack with itself, we'll discard the high part anyway chunk = _mm_packus_epi16(chunk, chunk); // unaligned 64-bit store - *(quint64*)&l[i] = _mm_cvtsi128_si64(chunk); + qUnalignedStore(l + i, _mm_cvtsi128_si64(chunk)); i += 8; } # endif |