]> code.bitgloo.com Git - clyne/constexpr-to-string.git/commitdiff
removed unnecessary base support
authorclyne <clyne@bitgloo.com>
Sun, 28 Jun 2020 13:22:44 +0000 (09:22 -0400)
committerGitHub <noreply@github.com>
Sun, 28 Jun 2020 13:22:44 +0000 (09:22 -0400)
f_to_string.hpp

index 3d0fd1898c6f08fc6b4ed47d0d00b918ed891eab..8b91a90b9804f7341598a186d6f2bec898b58372 100644 (file)
@@ -44,7 +44,7 @@ class f_to_string_t {
         auto append = [](auto V, auto& ptr) {
             if (V != 0) {
                 for (auto n = V; n; n /= 10)
-                    *--ptr = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[(V < 0 ? -1 : 1) * (n % 10)];
+                    *--ptr = (V < 0 ? -1 : 1) * (n % 10) + '0';
             } else {
                 *--ptr = '0';
             }