mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-27 21:23:25 +02:00
Plumbing: Use variadic templates for format()
- Use variadic templates, with a slight twist for properly supporting Taskwarrior's l10n strings. - Adjust code that relied on implicit type conversion which led to problems with template instantiation. - Move some functionality out of format() in order to keep it generic.
This commit is contained in:
parent
f0fbdaf2c9
commit
e95167a984
6 changed files with 73 additions and 218 deletions
|
@ -67,14 +67,14 @@ int CmdUrgency::execute (std::string& output)
|
|||
if (task.id)
|
||||
{
|
||||
out << format (STRING_CMD_URGENCY_RESULT,
|
||||
task.id, task.urgency ())
|
||||
task.id, trim (format (task.urgency (), 6, 3)))
|
||||
<< "\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
out << format (STRING_CMD_URGENCY_RESULT,
|
||||
task.get ("uuid"),
|
||||
task.urgency ())
|
||||
trim (format (task.urgency (), 6, 3)))
|
||||
<< "\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue