From: clyne Date: Sun, 28 Jun 2020 13:22:44 +0000 (-0400) Subject: removed unnecessary base support X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=837c3cc7f7a174979fbc9e66486fa559e440a007;p=clyne%2Fconstexpr-to-string.git removed unnecessary base support --- diff --git a/f_to_string.hpp b/f_to_string.hpp index 3d0fd18..8b91a90 100644 --- a/f_to_string.hpp +++ b/f_to_string.hpp @@ -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'; }