mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-12 20:23:51 +00:00
Remove AUTO_VAR macro and _toString function (#592)
This commit is contained in:
parent
7d6658fe5b
commit
55231bb8d3
294 changed files with 5067 additions and 5773 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue