From 5f1edbfce1b753b7fe4fb941e1f3e330aa3715f2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 2 Nov 2015 18:39:41 -0500 Subject: [PATCH] Revert "CmdEdit: Converted from strtol to std::stoi/stoul" This reverts commit cf831a9b7c9fcba4d94f78b3a7682c7068ce0534. --- src/commands/CmdEdit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index ffda4bf0a..ee53cc39f 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -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 (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