aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey <jeffryan@tamu.edu>2022-03-09 11:15:25 -0600
committerJeffrey <jeffryan@tamu.edu>2022-04-18 09:55:21 -0500
commit175b4117a926ce447490ebe02ae4b67e477baeb2 (patch)
treec3dfc37b0c146e4c79f36b83ec3d2f588a5601a8
parentRemove the only 4 non-UTF8 characters in codebase (diff)
downloadmonero-175b4117a926ce447490ebe02ae4b67e477baeb2.tar.xz
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
-rw-r--r--contrib/epee/include/time_helper.h8
1 files changed, 4 insertions, 4 deletions
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<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);