适应推

This commit is contained in:
EmsiaetKadosh
2025-03-23 16:59:23 +08:00
parent a335259edc
commit ce5ada7d38
9 changed files with 64 additions and 55 deletions
+5 -5
View File
@@ -108,11 +108,11 @@ static constexpr wchar Table16[17] = L"0123456789ABCDEF";
[[nodiscard]] inline String qwtowb10(QWORD value, const unsigned int fills = 1) noexcept {
static constexpr wchar Table10[11] = L"0123456789";
static constexpr QWORD Compare10[20] = {
0, 10, 100, 1000, 10000, 100000, 1000000, 10000000,
100000000, 1000000000, 10000000000, 100000000000,
1000000000000, 10000000000000, 100000000000000,
1000000000000000, 10000000000000000, 100000000000000000,
1000000000000000000, 10000000000000000000
0ull, 10ull, 100ull, 1000ull, 10000ull, 100000ull, 1000000ull, 10000000ull,
100000000ull, 1000000000ull, 10000000000ull, 100000000000ull,
1000000000000ull, 10000000000000ull, 100000000000000ull,
1000000000000000ull, 10000000000000000ull, 100000000000000000ull,
1000000000000000000ull, 10000000000000000000ull
};
String ret;
if (value < Compare10[fills]) {