mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Use nullptr instead lf C-styled NULL
This commit is contained in:
parent
6f19a3fbae
commit
511a235215
22 changed files with 56 additions and 56 deletions
|
@ -154,14 +154,14 @@ void ColumnDepends::modify (Task& task, const std::string& value)
|
|||
if (dep.length () == 37)
|
||||
task.removeDependency (dep.substr (1));
|
||||
else
|
||||
task.removeDependency (strtol (dep.substr (1).c_str (), NULL, 10));
|
||||
task.removeDependency (strtol (dep.substr (1).c_str (), nullptr, 10));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dep.length () == 36)
|
||||
task.addDependency (dep);
|
||||
else
|
||||
task.addDependency (strtol (dep.c_str (), NULL, 10));
|
||||
task.addDependency (strtol (dep.c_str (), nullptr, 10));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ void ColumnDescription::render (
|
|||
{
|
||||
for (const auto& i : task.getAnnotations ())
|
||||
{
|
||||
Datetime dt (strtol (i.first.substr (11).c_str (), NULL, 10));
|
||||
Datetime dt (strtol (i.first.substr (11).c_str (), nullptr, 10));
|
||||
description += '\n' + std::string (_indent, ' ') + dt.toString (_dateformat) + ' ' + i.second;
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ void ColumnDescription::render (
|
|||
{
|
||||
for (const auto& i : task.getAnnotations ())
|
||||
{
|
||||
Datetime dt (strtol (i.first.substr (11).c_str (), NULL, 10));
|
||||
Datetime dt (strtol (i.first.substr (11).c_str (), nullptr, 10));
|
||||
description += ' ' + dt.toString (_dateformat) + ' ' + i.second;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -241,7 +241,7 @@ void ColumnUDADate::measure (Task& task, unsigned int& minimum, unsigned int& ma
|
|||
// rc.report.<report>.dateformat
|
||||
// rc.dateformat.report
|
||||
// rc.dateformat
|
||||
Datetime date ((time_t) strtol (value.c_str (), NULL, 10));
|
||||
Datetime date ((time_t) strtol (value.c_str (), nullptr, 10));
|
||||
auto format = Context::getContext ().config.get ("report." + _report + ".dateformat");
|
||||
if (format == "")
|
||||
format = Context::getContext ().config.get ("dateformat.report");
|
||||
|
@ -287,7 +287,7 @@ void ColumnUDADate::render (
|
|||
format = Context::getContext ().config.get ("dateformat");
|
||||
}
|
||||
|
||||
renderStringLeft (lines, width, color, Datetime ((time_t) strtol (value.c_str (), NULL, 10)).toString (format));
|
||||
renderStringLeft (lines, width, color, Datetime ((time_t) strtol (value.c_str (), nullptr, 10)).toString (format));
|
||||
}
|
||||
else if (_style == "indicator")
|
||||
{
|
||||
|
|
|
@ -213,7 +213,7 @@ Column* Column::uda (const std::string& name)
|
|||
else if (type != "")
|
||||
throw std::string ("User defined attributes may only be of type 'string', 'date', 'duration' or 'numeric'.");
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue