diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-05 17:17:45 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-05 17:17:45 -0600 |
| commit | 0666959d312dc74903f55d1071488a90239330f1 (patch) | |
| tree | 5c6886f7ec65a7828bc6e34a469514e418bcf78b /Minecraft.World/Stat.cpp | |
| parent | 9370cbc7d878df1615d8ce76bc459e8b414d0f19 (diff) | |
| parent | eed770b121aa4ce38f002db042d0137c24c6d344 (diff) | |
Merge branch 'smartcmd:main' into main
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"; } |
