mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Change C-style-casts to static_cast in time_helper.h
At the request of @mj-xmr: https://github.com/monero-project/monero/pull/8211#discussion_r822868321
This commit is contained in:
parent
b49ed59166
commit
175b4117a9
@ -58,13 +58,13 @@ namespace misc_utils
|
||||
inline std::string get_time_interval_string(const time_t& time_)
|
||||
{
|
||||
time_t tail = time_;
|
||||
const int days = (int) (tail/(60*60*24));
|
||||
const int days = static_cast<int>(tail/(60*60*24));
|
||||
tail = tail%(60*60*24);
|
||||
const int hours = (int) (tail/(60*60));
|
||||
const int hours = static_cast<int>(tail/(60*60));
|
||||
tail = tail%(60*60);
|
||||
const int minutes = (int) (tail/(60));
|
||||
const int minutes = static_cast<int>(tail/60);
|
||||
tail = tail%(60);
|
||||
const int seconds = (int) tail;
|
||||
const int seconds = static_cast<int>(tail);
|
||||
|
||||
char tmpbuf[64] = {0};
|
||||
snprintf(tmpbuf, sizeof(tmpbuf) - 1, "d%d.h%d.m%d.s%d", days, hours, minutes, seconds);
|
||||
|
Loading…
Reference in New Issue
Block a user