aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Schupp <w.schupp@a1.net>2018-12-28 09:25:59 +0100
committerGitHub <noreply@github.com>2018-12-28 09:25:59 +0100
commit94184731d2bb21f98d5964a268e18cc2a04ffb9d (patch)
tree455199ee63b7acda7a8bd2e766fb8d7660f346d7
parente2532fff047a96e48be76b8b44b916072af2ea1a (diff)
parent5ad58c971ef983e66ae2bf18a2f73f948c16b928 (diff)
Merge pull request #15140 from wsnipex/build-date
fix CID 1441972
-rw-r--r--xbmc/CompileInfo.cpp.in6
-rw-r--r--xbmc/CompileInfo.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/xbmc/CompileInfo.cpp.in b/xbmc/CompileInfo.cpp.in
index 7e4d884ef8..c47e6cc594 100644
--- a/xbmc/CompileInfo.cpp.in
+++ b/xbmc/CompileInfo.cpp.in
@@ -8,9 +8,9 @@
#include "CompileInfo.h"
+#include <algorithm>
#include <cstddef>
#include <string>
-#include <algorithm>
int CCompileInfo::GetMajor()
@@ -60,13 +60,13 @@ const char* CCompileInfo::GetCopyrightYears()
return "@APP_COPYRIGHT_YEARS@";
}
-const char* CCompileInfo::GetBuildDate()
+std::string CCompileInfo::GetBuildDate()
{
const std::string bdate = "@APP_BUILD_DATE@";
if (!bdate.empty())
{
std::string datestamp = bdate.substr(0, 4) + "-" + bdate.substr(4, 2) + "-" + bdate.substr(6, 2);
- return datestamp.c_str();
+ return datestamp;
}
return "1970-01-01";
}
diff --git a/xbmc/CompileInfo.h b/xbmc/CompileInfo.h
index c92d24083a..db3cfbe0f2 100644
--- a/xbmc/CompileInfo.h
+++ b/xbmc/CompileInfo.h
@@ -8,6 +8,8 @@
#pragma once
+#include <string>
+
class CCompileInfo
{
public:
@@ -19,5 +21,5 @@ public:
static const char *GetSuffix(); // Git "Tag", e.g. alpha1
static const char* GetSCMID(); // Git Revision
static const char* GetCopyrightYears();
- static const char* GetBuildDate();
+ static std::string GetBuildDate();
};