Use nullptr instead lf C-styled NULL

This commit is contained in:
Kirill Bobyrev
2018-03-07 22:21:28 +03:00
parent 24634f2d15
commit 5cdbe6d019
22 changed files with 56 additions and 56 deletions

View File

@@ -80,7 +80,7 @@ int CmdSummary::execute (std::string& output)
std::map <std::string, int> countCompleted;
std::map <std::string, double> sumEntry;
std::map <std::string, int> counter;
time_t now = time (NULL);
time_t now = time (nullptr);
// Initialize counters.
for (auto& project : allProjects)
@@ -108,7 +108,7 @@ int CmdSummary::execute (std::string& output)
{
++countPending[parent];
time_t entry = strtol (task.get ("entry").c_str (), NULL, 10);
time_t entry = strtol (task.get ("entry").c_str (), nullptr, 10);
if (entry)
sumEntry[parent] = sumEntry[parent] + (double) (now - entry);
}
@@ -120,8 +120,8 @@ int CmdSummary::execute (std::string& output)
{
++countCompleted[parent];
time_t entry = strtol (task.get ("entry").c_str (), NULL, 10);
time_t end = strtol (task.get ("end").c_str (), NULL, 10);
time_t entry = strtol (task.get ("entry").c_str (), nullptr, 10);
time_t end = strtol (task.get ("end").c_str (), nullptr, 10);
if (entry && end)
sumEntry[parent] = sumEntry[parent] + (double) (end - entry);
}