From 175b4117a926ce447490ebe02ae4b67e477baeb2 Mon Sep 17 00:00:00 2001 From: Jeffrey Date: Wed, 9 Mar 2022 11:15:25 -0600 Subject: 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 --- contrib/epee/include/time_helper.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib') diff --git a/contrib/epee/include/time_helper.h b/contrib/epee/include/time_helper.h index 632996bc5..b306880d9 100644 --- a/contrib/epee/include/time_helper.h +++ b/contrib/epee/include/time_helper.h @@ -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(tail/(60*60*24)); tail = tail%(60*60*24); - const int hours = (int) (tail/(60*60)); + const int hours = static_cast(tail/(60*60)); tail = tail%(60*60); - const int minutes = (int) (tail/(60)); + const int minutes = static_cast(tail/60); tail = tail%(60); - const int seconds = (int) tail; + const int seconds = static_cast(tail); char tmpbuf[64] = {0}; snprintf(tmpbuf, sizeof(tmpbuf) - 1, "d%d.h%d.m%d.s%d", days, hours, minutes, seconds); -- cgit v1.2.3