mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CmdEdit: Converted from strtol to std::stoi/stoul
This commit is contained in:
parent
368df43583
commit
cf831a9b7c
1 changed files with 2 additions and 2 deletions
|
@ -251,7 +251,7 @@ std::string CmdEdit::formatTask (Task task, const std::string& dateformat)
|
||||||
task.getAnnotations (annotations);
|
task.getAnnotations (annotations);
|
||||||
for (auto& anno : annotations)
|
for (auto& anno : annotations)
|
||||||
{
|
{
|
||||||
ISO8601d dt (strtol (anno.first.substr (11).c_str (), NULL, 10));
|
ISO8601d dt (static_cast <time_t> (std::stoul (anno.first.substr (11))));
|
||||||
before << " Annotation: " << dt.toString (dateformat)
|
before << " Annotation: " << dt.toString (dateformat)
|
||||||
<< " -- " << json::encode (anno.second) << "\n";
|
<< " -- " << json::encode (anno.second) << "\n";
|
||||||
}
|
}
|
||||||
|
@ -678,7 +678,7 @@ void CmdEdit::parseTask (Task& task, const std::string& after, const std::string
|
||||||
if (dep.length () >= 7)
|
if (dep.length () >= 7)
|
||||||
task.addDependency (dep);
|
task.addDependency (dep);
|
||||||
else
|
else
|
||||||
task.addDependency ((int) strtol (dep.c_str (), NULL, 10));
|
task.addDependency (std::stoi (dep));
|
||||||
}
|
}
|
||||||
|
|
||||||
// UDAs
|
// UDAs
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue