diff options
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qtools_p.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index aa35d764fa..beda0f4919 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -240,7 +240,7 @@ void qt_from_latin1(ushort *dst, const char *str, size_t size) dst += offset; str += offset; # ifdef Q_COMPILER_LAMBDA - return UnrollTailLoop<15>::exec(size, [=](int i) { dst[i] = (uchar)str[i]; }); + return UnrollTailLoop<15>::exec(int(size), [=](int i) { dst[i] = (uchar)str[i]; }); # endif #endif #if defined(__mips_dsp) diff --git a/src/corelib/tools/qtools_p.h b/src/corelib/tools/qtools_p.h index b48ed94236..3a407aea5b 100644 --- a/src/corelib/tools/qtools_p.h +++ b/src/corelib/tools/qtools_p.h @@ -63,9 +63,9 @@ Q_DECL_CONSTEXPR inline char toHexLower(uint value) Q_DECL_NOTHROW Q_DECL_CONSTEXPR inline int fromHex(uint c) Q_DECL_NOTHROW { - return ((c >= '0') && (c <= '9')) ? c - '0' : - ((c >= 'A') && (c <= 'F')) ? c - 'A' + 10 : - ((c >= 'a') && (c <= 'f')) ? c - 'a' + 10 : + return ((c >= '0') && (c <= '9')) ? int(c - '0') : + ((c >= 'A') && (c <= 'F')) ? int(c - 'A' + 10) : + ((c >= 'a') && (c <= 'f')) ? int(c - 'a' + 10) : /* otherwise */ -1; } @@ -76,7 +76,7 @@ Q_DECL_CONSTEXPR inline char toOct(uint value) Q_DECL_NOTHROW Q_DECL_CONSTEXPR inline int fromOct(uint c) Q_DECL_NOTHROW { - return ((c >= '0') && (c <= '7')) ? c - '0' : -1; + return ((c >= '0') && (c <= '7')) ? int(c - '0') : -1; } } |