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
No known key found for this signature in database
GPG key ID: C473398631E27767
22 changed files with 56 additions and 56 deletions

View file

@ -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] &&