diff options
author | crupest <crupest@outlook.com> | 2021-09-15 19:17:38 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-09-15 19:17:38 +0800 |
commit | cb981f5a337f3a8fc9d450b891c358c2b8dc29d3 (patch) | |
tree | 5216a09c127e534edfebca22f8b91d876812f6b4 /src/platform/Color.cpp | |
parent | 105e4ad880a810300bf4b3a0a0752ae58924667b (diff) | |
download | cru-cb981f5a337f3a8fc9d450b891c358c2b8dc29d3.tar.gz cru-cb981f5a337f3a8fc9d450b891c358c2b8dc29d3.tar.bz2 cru-cb981f5a337f3a8fc9d450b891c358c2b8dc29d3.zip |
...
Diffstat (limited to 'src/platform/Color.cpp')
-rw-r--r-- | src/platform/Color.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/Color.cpp b/src/platform/Color.cpp index 52534048..cced498c 100644 --- a/src/platform/Color.cpp +++ b/src/platform/Color.cpp @@ -13,11 +13,11 @@ String Color::ToString() const { return v >= 10 ? v - 10 + u'a' : v + u'0'; }; - auto to_two_hex_digit = [to_hex](std::uint8_t v) -> std::u16string { + auto to_two_hex_digit = [to_hex](std::uint8_t v) -> String { return {to_hex(v /= 16), to_hex(v %= 16)}; }; - std::u16string result = u"#"; + String result = u"#"; result.append(to_two_hex_digit(red)); result.append(to_two_hex_digit(green)); result.append(to_two_hex_digit(blue)); |