mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 22:47:20 +02:00
Code Cleanup
- Migrated format helper functions over from taskd. - Converted much of the sprintf usage to format calls.
This commit is contained in:
parent
5f007ed1d9
commit
a6cf99a83c
12 changed files with 138 additions and 47 deletions
|
@ -140,20 +140,14 @@ int handleCustomReport (const std::string& report, std::string& outs)
|
|||
table.setColumnWidth (columnCount, Table::minimum);
|
||||
table.setColumnJustification (columnCount, Table::right);
|
||||
|
||||
char s[16];
|
||||
std::string value;
|
||||
int row = 0;
|
||||
foreach (task, tasks)
|
||||
{
|
||||
if (task->id != 0)
|
||||
{
|
||||
sprintf (s, "%d", (int) task->id);
|
||||
value = s;
|
||||
}
|
||||
value = format (task->id);
|
||||
else
|
||||
{
|
||||
value = "-";
|
||||
}
|
||||
|
||||
context.hooks.trigger ("format-id", "id", value);
|
||||
table.addCell (row++, columnCount, value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue