summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-11-18 14:19:09 -0800
committerThiago Macieira <thiago.macieira@intel.com>2014-12-13 05:10:28 +0100
commitef89efe137b7c32f4700d259e593bb35c7c264e2 (patch)
tree018532ee0b10b669128401f2e4f15efa7de1899e /src/corelib/plugin
parentcfe12f716b0e138b51e3d8f5e481c4d9624459dc (diff)
Merge the multiple implementations of fromHex too
Change-Id: I8c22f784207dd8bffb88e70ac3c867abf0af86af Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/quuid.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index f7c569f123..6df3f3b0d1 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -62,15 +62,9 @@ bool _q_fromHex(const Char *&src, Integral &value)
value = 0;
for (uint i = 0; i < sizeof(Integral) * 2; ++i) {
- int ch = *src++;
- int tmp;
- if (ch >= '0' && ch <= '9')
- tmp = ch - '0';
- else if (ch >= 'a' && ch <= 'f')
- tmp = ch - 'a' + 10;
- else if (ch >= 'A' && ch <= 'F')
- tmp = ch - 'A' + 10;
- else
+ uint ch = *src++;
+ int tmp = QtMiscUtils::fromHex(ch);
+ if (tmp == -1)
return false;
value = value * 16 + tmp;