diff --git a/src/recur.cpp b/src/recur.cpp index a27b36de9..37b06b5d0 100644 --- a/src/recur.cpp +++ b/src/recur.cpp @@ -240,7 +240,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period) else if (Lexer::isDigit (period[0]) && period[period.length () - 1] == 'm') { - int increment = strtol (period.substr (0, period.length () - 1).c_str (), NULL, 10); + int increment = std::stoi (period.substr (0, period.length () - 1)); m += increment; while (m > 12) @@ -259,7 +259,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period) Lexer::isAllDigits (period.substr (1, period.length () - 2)) && period[period.length () - 1] == 'M') { - int increment = strtol (period.substr (0, period.length () - 1).c_str (), NULL, 10); + int increment = std::stoi (period.substr (0, period.length () - 1)); m += increment; while (m > 12) @@ -292,7 +292,7 @@ ISO8601d getNextRecurrence (ISO8601d& current, std::string& period) else if (Lexer::isDigit (period[0]) && period[period.length () - 1] == 'q') { - int increment = strtol (period.substr (0, period.length () - 1).c_str (), NULL, 10); + int increment = std::stoi (period.substr (0, period.length () - 1)); m += 3 * increment; while (m > 12) @@ -384,7 +384,7 @@ void updateRecurrenceMask (Task& task) if (uuid != "" && context.tdb2.get (uuid, parent)) { - unsigned int index = strtol (task.get ("imask").c_str (), NULL, 10); + unsigned int index = std::stoi (task.get ("imask")); std::string mask = parent.get ("mask"); if (mask.length () > index) {