From 488e9638b71b8b9cdb3055835815d77720eae06b Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Fri, 8 Oct 2021 09:13:08 +0900 Subject: Imported Upstream version 3.10.0 --- Source/cmTimestamp.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/cmTimestamp.cxx') diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx index 4b9718847..9fb79d945 100644 --- a/Source/cmTimestamp.cxx +++ b/Source/cmTimestamp.cxx @@ -2,7 +2,6 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmTimestamp.h" -#include "cmConfigure.h" #include #include #include @@ -12,7 +11,7 @@ std::string cmTimestamp::CurrentTime(const std::string& formatString, bool utcFlag) { - time_t currentTimeT = time(CM_NULLPTR); + time_t currentTimeT = time(nullptr); std::string source_date_epoch; cmSystemTools::GetEnv("SOURCE_DATE_EPOCH", source_date_epoch); if (!source_date_epoch.empty()) { @@ -56,14 +55,14 @@ std::string cmTimestamp::CreateTimestampFromTimeT(time_t timeT, struct tm timeStruct; memset(&timeStruct, 0, sizeof(timeStruct)); - struct tm* ptr = (struct tm*)CM_NULLPTR; + struct tm* ptr = nullptr; if (utcFlag) { ptr = gmtime(&timeT); } else { ptr = localtime(&timeT); } - if (ptr == CM_NULLPTR) { + if (ptr == nullptr) { return std::string(); } @@ -124,7 +123,9 @@ std::string cmTimestamp::AddTimestampComponent(char flag, switch (flag) { case 'a': + case 'A': case 'b': + case 'B': case 'd': case 'H': case 'I': -- cgit v1.2.3