diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-10-19 12:11:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-10-19 15:12:22 +0300 |
commit | ad1e0ec0584eebabbeac7473baba956e957101b5 (patch) | |
tree | 159038bf672549ba27a7fe6c4b16e35ad4328bcc /src/utils/stringutils.cpp | |
parent | 7872a934b205ac346b72e762ac663ba04b126c7c (diff) | |
download | mv-ad1e0ec0584eebabbeac7473baba956e957101b5.tar.gz mv-ad1e0ec0584eebabbeac7473baba956e957101b5.tar.bz2 mv-ad1e0ec0584eebabbeac7473baba956e957101b5.tar.xz mv-ad1e0ec0584eebabbeac7473baba956e957101b5.zip |
fix initialisation in stringutils.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r-- | src/utils/stringutils.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 0b4e4180a..171ef6ceb 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -663,12 +663,9 @@ bool strStartWith(const std::string &str1, const std::string &str2) std::string getDateString() { char buffer[80]; - time_t rawtime; - struct tm *timeinfo; - time(&rawtime); - timeinfo = localtime(&rawtime); + const tm *const timeinfo = localtime(&rawtime); strftime(buffer, 79, "%Y-%m-%d", timeinfo); return std::string(buffer); |