summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/global/qendian.h5
-rw-r--r--src/corelib/plugin/quuid.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 4e3f4e312f..8a17af55f2 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -363,6 +363,11 @@ template <typename T> inline void qToLittleEndian(T src, uchar *dest)
#endif // Q_BYTE_ORDER == Q_BIG_ENDIAN
+template <> inline quint8 qbswap<quint8>(quint8 source)
+{
+ return source;
+}
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 7ef8522411..e99f87a86f 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -52,8 +52,7 @@ void _q_toHex(Char *&dst, Integral value)
{
static const char digits[] = "0123456789abcdef";
- if (sizeof(Integral) > 1)
- value = qToBigEndian(value);
+ value = qToBigEndian(value);
const char* p = reinterpret_cast<const char*>(&value);