diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-06 02:11:18 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 02:11:18 +0700 |
| commit | 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (patch) | |
| tree | 953c537a5c66e328e9f4ab29626cf738112d53c0 /Minecraft.World/Stat.cpp | |
| parent | 7d6658fe5b3095f35093701b5ab669ffc291e875 (diff) | |
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.World/Stat.cpp')
| -rw-r--r-- | Minecraft.World/Stat.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Minecraft.World/Stat.cpp b/Minecraft.World/Stat.cpp index 868ff3bd..97a655c7 100644 --- a/Minecraft.World/Stat.cpp +++ b/Minecraft.World/Stat.cpp @@ -76,21 +76,21 @@ wstring Stat::TimeFormatter::format(int value) if (years > 0.5) { return decimalFormat->format(years) + L" y"; - } - else if (days > 0.5) + } + else if (days > 0.5) { return decimalFormat->format(days) + L" d"; } else if (hours > 0.5) { return decimalFormat->format(hours) + L" h"; - } - else if (minutes > 0.5) + } + else if (minutes > 0.5) { return decimalFormat->format(minutes) + L" m"; } - return _toString<double>(seconds) + L" s"; + return std::to_wstring(seconds) + L" s"; } wstring Stat::DefaultFormat::format(int value) @@ -103,13 +103,13 @@ wstring Stat::DistanceFormatter::format(int cm) double meters = cm / 100.0; double kilometers = meters / 1000.0; - if (kilometers > 0.5) + if (kilometers > 0.5) { return decimalFormat->format(kilometers) + L" km"; - } else if (meters > 0.5) + } else if (meters > 0.5) { return decimalFormat->format(meters) + L" m"; } - return _toString<int>(cm) + L" cm"; + return std::to_wstring(cm) + L" cm"; } |
