From 0d88df1c183c940ce5a8d367c2653382738fac68 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 1 Nov 2015 22:07:46 -0500 Subject: [PATCH] CmdSummary: Converted from strtol to std::stoul --- src/commands/CmdSummary.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/CmdSummary.cpp b/src/commands/CmdSummary.cpp index 170108f88..5f6af1465 100644 --- a/src/commands/CmdSummary.cpp +++ b/src/commands/CmdSummary.cpp @@ -110,7 +110,7 @@ int CmdSummary::execute (std::string& output) { ++countPending[parent]; - time_t entry = strtol (task.get ("entry").c_str (), NULL, 10); + time_t entry = static_cast (std::stoul (task.get ("entry"))); if (entry) sumEntry[parent] = sumEntry[parent] + (double) (now - entry); } @@ -122,8 +122,8 @@ int CmdSummary::execute (std::string& output) { ++countCompleted[parent]; - time_t entry = strtol (task.get ("entry").c_str (), NULL, 10); - time_t end = strtol (task.get ("end").c_str (), NULL, 10); + time_t entry = static_cast (std::stoul (task.get ("entry"))); + time_t end = static_cast (std::stoul (task.get ("end"))); if (entry && end) sumEntry[parent] = sumEntry[parent] + (double) (end - entry); }