diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-14 17:57:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-14 17:57:13 +0300 |
commit | ce3ecf15a3ba126e665500270ef7fc8584d0b9b2 (patch) | |
tree | 50cf12d464c4391d26de6f191465b955dfb928b1 /src | |
parent | 7b9295189c8be1575a5d45bd3ba69cf64dc31644 (diff) | |
download | mv-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.tar.gz mv-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.tar.bz2 mv-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.tar.xz mv-ce3ecf15a3ba126e665500270ef7fc8584d0b9b2.zip |
Fix type cast in stringutils.
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/stringutils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 66f61f168..16f45932d 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -927,8 +927,9 @@ std::string removeToken(std::string &str, const std::string &token) std::string timeToStr(const uint32_t time) { char buf[101]; - const uint64_t tempTime = static_cast<uint64_t>(time); - tm *const timeInfo = localtime(reinterpret_cast<const time_t*>(&tempTime)); + time_t tempTime = reinterpret_cast<time_t>( + static_cast<long int>(time)); + tm *const timeInfo = localtime(&tempTime); if (strftime(&buf[0], 100, "%Y-%m-%d_%H-%M-%S", timeInfo)) return std::string(buf); else |