mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Task
- Added ::get_float method for accessing numeric attributes.
This commit is contained in:
parent
f3bdac085b
commit
1ccbb3b43a
2 changed files with 11 additions and 0 deletions
10
src/Task.cpp
10
src/Task.cpp
|
@ -279,6 +279,16 @@ unsigned long Task::get_ulong (const std::string& name) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
float Task::get_float (const std::string& name) const
|
||||
{
|
||||
Task::const_iterator i = this->find (name);
|
||||
if (i != this->end ())
|
||||
return strtof (i->second.c_str (), NULL);
|
||||
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
time_t Task::get_date (const std::string& name) const
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue