Skip to content
Permalink
Browse files

Fix MSVC build broken by 34d32ce

`round` -> `myround`
Remove superflous `floor` calls
  • Loading branch information
SmallJoker committed Apr 17, 2017
1 parent 04cc9de commit 61202513208b23d3e7a2a91d10aba154e6cbf352
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/network/serverpackethandler.cpp
  2. +2 −2 src/server.cpp
  3. +2 −2 src/util/string.h
@@ -726,7 +726,7 @@ void Server::handleCommand_ClientReady(NetworkPacket* pkt)
if (m_shutdown_timer > 0.0f) {
std::wstringstream ws;
ws << L"*** Server shutting down in "
<< duration_to_string(round(m_shutdown_timer)).c_str() << ".";
<< duration_to_string(myround(m_shutdown_timer)).c_str() << ".";
SendChatMessage(pkt->getPeerId(), ws.str());
}
}
@@ -1047,7 +1047,7 @@ void Server::AsyncRunStep(bool initial_step)
std::wstringstream ws;

ws << L"*** Server shutting down in "
<< duration_to_string(round(m_shutdown_timer - dtime)).c_str()
<< duration_to_string(myround(m_shutdown_timer - dtime)).c_str()
<< ".";

infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
@@ -3502,7 +3502,7 @@ void Server::requestShutdown(const std::string &msg, bool reconnect, float delay
std::wstringstream ws;

ws << L"*** Server shutting down in "
<< duration_to_string(round(m_shutdown_timer)).c_str()
<< duration_to_string(myround(m_shutdown_timer)).c_str()
<< ".";

infostream << wide_to_utf8(ws.str()).c_str() << std::endl;
@@ -616,9 +616,9 @@ inline const char *bool_to_cstr(bool val)

inline const std::string duration_to_string(int sec)
{
int min = floor(sec / 60);
int min = sec / 60;
sec %= 60;
int hour = floor(min / 60);
int hour = min / 60;
min %= 60;

std::stringstream ss;

0 comments on commit 6120251

Please sign in to comment.
You can’t perform that action at this time.