summaryrefslogtreecommitdiffstats
path: root/Source/cmTimestamp.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-22 21:42:36 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-08-24 21:39:47 (GMT)
commit5962db438939ef2754509b8578af1f845ec07dc8 (patch)
treef6b0c0db2acc8dc889d2d5d46fdf75659daa17e7 /Source/cmTimestamp.cxx
parentfe19fda2aa2595622c463fccaa8b36a91e4521c4 (diff)
downloadCMake-5962db438939ef2754509b8578af1f845ec07dc8.zip
CMake-5962db438939ef2754509b8578af1f845ec07dc8.tar.gz
CMake-5962db438939ef2754509b8578af1f845ec07dc8.tar.bz2
Use C++11 nullptr
Diffstat (limited to 'Source/cmTimestamp.cxx')
-rw-r--r--Source/cmTimestamp.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index 4b97188..ad08444 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -12,7 +12,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 +56,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 = (struct tm*)nullptr;
if (utcFlag) {
ptr = gmtime(&timeT);
} else {
ptr = localtime(&timeT);
}
- if (ptr == CM_NULLPTR) {
+ if (ptr == nullptr) {
return std::string();
}