Use nullptr instead lf C-styled NULL
This commit is contained in:
@@ -122,12 +122,12 @@ int CmdCalendar::execute (std::string& output)
|
||||
|
||||
// YYYY.
|
||||
else if (Lexer::isAllDigits (arg) && arg.length () == 4)
|
||||
argYear = strtol (arg.c_str (), NULL, 10);
|
||||
argYear = strtol (arg.c_str (), nullptr, 10);
|
||||
|
||||
// MM.
|
||||
else if (Lexer::isAllDigits (arg) && arg.length () <= 2)
|
||||
{
|
||||
argMonth = strtol (arg.c_str (), NULL, 10);
|
||||
argMonth = strtol (arg.c_str (), nullptr, 10);
|
||||
if (argMonth < 1 || argMonth > 12)
|
||||
throw format ("Argument '{1}' is not a valid month.", arg);
|
||||
}
|
||||
@@ -565,7 +565,7 @@ std::string CmdCalendar::renderMonths (
|
||||
task.has ("due"))
|
||||
{
|
||||
std::string due = task.get ("due");
|
||||
Datetime duedmy (strtol (due.c_str(), NULL, 10));
|
||||
Datetime duedmy (strtol (due.c_str(), nullptr, 10));
|
||||
|
||||
if (duedmy.day () == d &&
|
||||
duedmy.month () == months[mpl] &&
|
||||
|
||||
Reference in New Issue
Block a user