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

This reverts commit cf831a9b7c.
This commit is contained in:
Paul Beckingham 2015-11-02 18:39:41 -05:00
parent 639e04d853
commit 5f1edbfce1

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 (static_cast <time_t> (std::stoul (anno.first.substr (11))));
ISO8601d dt (strtol (anno.first.substr (11).c_str (), NULL, 10));
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 (std::stoi (dep));
task.addDependency ((int) strtol (dep.c_str (), NULL, 10));
}
// UDAs