mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 15:47:19 +02:00
Build
- Converted more atoi to strtol calls.
This commit is contained in:
parent
223c7b3c56
commit
5732833da2
3 changed files with 8 additions and 5 deletions
|
@ -26,6 +26,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
#include <Context.h>
|
||||
#include <ViewText.h>
|
||||
#include <Duration.h>
|
||||
|
@ -96,7 +97,7 @@ int CmdSummary::execute (const std::string&, std::string& output)
|
|||
{
|
||||
++countPending[project];
|
||||
|
||||
time_t entry = atoi (task->get ("entry").c_str ());
|
||||
time_t entry = strtol (task->get ("entry").c_str (), NULL, 10);
|
||||
if (entry)
|
||||
sumEntry[project] = sumEntry[project] + (double) (now - entry);
|
||||
}
|
||||
|
@ -105,8 +106,8 @@ int CmdSummary::execute (const std::string&, std::string& output)
|
|||
{
|
||||
++countCompleted[project];
|
||||
|
||||
time_t entry = atoi (task->get ("entry").c_str ());
|
||||
time_t end = atoi (task->get ("end").c_str ());
|
||||
time_t entry = strtol (task->get ("entry").c_str (), NULL, 10);
|
||||
time_t end = strtol (task->get ("end").c_str (), NULL, 10);
|
||||
if (entry && end)
|
||||
sumEntry[project] = sumEntry[project] + (double) (end - entry);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue