summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-11-21 14:07:18 +0200
committerVille Voutilainen <ville.voutilainen@qt.io>2018-11-29 20:42:33 +0000
commit1eeebae7e3b5eb8dda37755b32aafe6719b5cf7b (patch)
tree5250583442b3d6bb247d28387b28766eb167e253
parent6b875f0625acc6c6a4f8899b829176baaf7d8502 (diff)
Fix compilation of qendian's qswap specializations on gcc 4.8
Task-number: QTBUG-71945 Change-Id: Icf2b75c72946f57ebffc880c9238531dea13ab5b Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/corelib/global/qendian.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 0e67a1ab8e..f2e5833468 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -162,17 +162,17 @@ Float qbswapFloatHelper(Float source)
return qFromUnaligned<Float>(&temp);
}
-template <> inline qfloat16 qbswap<qfloat16>(qfloat16 source)
+inline qfloat16 qbswap(qfloat16 source)
{
return qbswapFloatHelper(source);
}
-template <> inline float qbswap<float>(float source)
+inline float qbswap(float source)
{
return qbswapFloatHelper(source);
}
-template <> inline double qbswap<double>(double source)
+inline double qbswap(double source)
{
return qbswapFloatHelper(source);
}
@@ -185,7 +185,7 @@ template <> inline double qbswap<double>(double source)
*/
template <typename T> inline void qbswap(const T src, void *dest)
{
- qToUnaligned<T>(qbswap<T>(src), dest);
+ qToUnaligned<T>(qbswap(src), dest);
}
template <int Size> void *qbswap(const void *source, qsizetype count, void *dest) noexcept;
@@ -223,9 +223,9 @@ template <typename T> inline void qFromLittleEndian(const void *source, qsizetyp
#else // Q_LITTLE_ENDIAN
template <typename T> inline Q_DECL_CONSTEXPR T qToBigEndian(T source)
-{ return qbswap<T>(source); }
+{ return qbswap(source); }
template <typename T> inline Q_DECL_CONSTEXPR T qFromBigEndian(T source)
-{ return qbswap<T>(source); }
+{ return qbswap(source); }
template <typename T> inline Q_DECL_CONSTEXPR T qToLittleEndian(T source)
{ return source; }
template <typename T> inline Q_DECL_CONSTEXPR T qFromLittleEndian(T source)