summaryrefslogtreecommitdiffstats
path: root/Source/cmUuid.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmUuid.cxx')
-rw-r--r--Source/cmUuid.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmUuid.cxx b/Source/cmUuid.cxx
index 51ecbd1..0dc6ca7 100644
--- a/Source/cmUuid.cxx
+++ b/Source/cmUuid.cxx
@@ -114,14 +114,12 @@ std::string cmUuid::BinaryToString(const unsigned char* input) const
std::string cmUuid::ByteToHex(unsigned char byte) const
{
- std::string result;
+ std::string result(" ");
for (int i = 0; i < 2; ++i) {
unsigned char rest = byte % 16;
byte /= 16;
-
char c = (rest < 0xA) ? char('0' + rest) : char('a' + (rest - 0xA));
-
- result = c + result;
+ result.at(1 - i) = c;
}
return result;