CmdEdit: Converted from strtol to std::stoi/stoul

This commit is contained in:
Paul Beckingham 2015-11-01 22:00:44 -05:00
parent 368df43583
commit cf831a9b7c

View file

@ -251,7 +251,7 @@ std::string CmdEdit::formatTask (Task task, const std::string& dateformat)
task.getAnnotations (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)
<< " -- " << 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)
task.addDependency (dep);
else
task.addDependency ((int) strtol (dep.c_str (), NULL, 10));
task.addDependency (std::stoi (dep));
}
// UDAs