mirror of
https://github.com/minetest/minetest.git
synced 2024-11-26 17:43:45 +01:00
Tweak duration_to_string formatting
This commit is contained in:
parent
9113538142
commit
62e3593944
@ -671,10 +671,14 @@ inline const std::string duration_to_string(int sec)
|
||||
std::stringstream ss;
|
||||
if (hour > 0) {
|
||||
ss << hour << "h";
|
||||
if (min > 0 || sec > 0)
|
||||
ss << " ";
|
||||
}
|
||||
|
||||
if (min > 0) {
|
||||
ss << min << "m ";
|
||||
ss << min << "min";
|
||||
if (sec > 0)
|
||||
ss << " ";
|
||||
}
|
||||
|
||||
if (sec > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user