Revert "CmdEdit: Converted from strtol to std::stoi/stoul"
This reverts commit cf831a9b7c.
This commit is contained in:
@@ -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 (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)
|
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 (std::stoi (dep));
|
task.addDependency ((int) strtol (dep.c_str (), NULL, 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
// UDAs
|
// UDAs
|
||||||
|
|||||||
Reference in New Issue
Block a user