summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-19 12:11:55 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:22 +0300
commitad1e0ec0584eebabbeac7473baba956e957101b5 (patch)
tree159038bf672549ba27a7fe6c4b16e35ad4328bcc /src/utils/stringutils.cpp
parent7872a934b205ac346b72e762ac663ba04b126c7c (diff)
downloadManaVerse-ad1e0ec0584eebabbeac7473baba956e957101b5.tar.gz
ManaVerse-ad1e0ec0584eebabbeac7473baba956e957101b5.tar.bz2
ManaVerse-ad1e0ec0584eebabbeac7473baba956e957101b5.tar.xz
ManaVerse-ad1e0ec0584eebabbeac7473baba956e957101b5.zip
fix initialisation in stringutils.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp5
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);