From 9547e64f0f25bb9f50cac9ba9dc035fbc051d4c2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Feb 2016 17:55:24 +0300 Subject: Change timeToStr function parameter type from int to uint32_t. --- src/utils/stringutils.cpp | 4 ++-- src/utils/stringutils.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index ba6e46ee0..041003988 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -909,10 +909,10 @@ std::string removeToken(std::string &str, const std::string &token) return str; } -std::string timeToStr(const int time) +std::string timeToStr(const uint32_t time) { char buf[101]; - const long tempTime = static_cast(time); + const uint64_t tempTime = static_cast(time); tm *const timeInfo = localtime(reinterpret_cast(&tempTime)); if (strftime(&buf[0], 100, "%Y-%m-%d_%H-%M-%S", timeInfo)) return std::string(buf); diff --git a/src/utils/stringutils.h b/src/utils/stringutils.h index 25daf765f..67e91a464 100644 --- a/src/utils/stringutils.h +++ b/src/utils/stringutils.h @@ -256,7 +256,7 @@ uint32_t parseNumber(const std::string &str); std::string removeToken(std::string &str, const std::string &token); -std::string timeToStr(const int time); +std::string timeToStr(const uint32_t time); std::string timeDiffToString(int timeDiff); -- cgit v1.2.3-70-g09d2