mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-27 19:17:19 +02:00
DOM: Concerted from strtol to std::stoul/stoi
This commit is contained in:
parent
d295755bb7
commit
c903185481
1 changed files with 2 additions and 2 deletions
|
@ -349,7 +349,7 @@ bool DOM::get (const std::string& name, const Task& task, Variant& value)
|
||||||
{
|
{
|
||||||
// annotation_1234567890
|
// annotation_1234567890
|
||||||
// 0 ^11
|
// 0 ^11
|
||||||
value = Variant ((time_t) strtol (i.first.substr (11).c_str (), NULL, 10), Variant::type_date);
|
value = Variant (static_cast <time_t> (std::stoul (i.first.substr (11))), Variant::type_date);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (elements[2] == "description")
|
else if (elements[2] == "description")
|
||||||
|
@ -366,7 +366,7 @@ bool DOM::get (const std::string& name, const Task& task, Variant& value)
|
||||||
std::map <std::string, std::string> annos;
|
std::map <std::string, std::string> annos;
|
||||||
ref.getAnnotations (annos);
|
ref.getAnnotations (annos);
|
||||||
|
|
||||||
int a = strtol (elements[1].c_str (), NULL, 10);
|
int a = std::stoi (elements[1]);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
// Count off the 'a'th annotation.
|
// Count off the 'a'th annotation.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue