summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qtools_p.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-25 11:23:46 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-02-25 11:23:46 +0000
commit2cac171ddedfecdfc6fa27c5326f9eebfab1822e (patch)
treeff8e7c162875d7374ddc42224a91533b7e8c8663 /src/corelib/tools/qtools_p.h
parent5113fdeb7d50979c6acbe2c9c5b26ad134614873 (diff)
parent709e40093e6081b18e0d3003e0a088e1a9b6f211 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/tools/qtools_p.h')
-rw-r--r--src/corelib/tools/qtools_p.h8
1 files changed, 4 insertions, 4 deletions
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;
}
}