mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-08 15:20:36 +02:00
C++11: Cleaned up column code wiht range-based for
This commit is contained in:
parent
5b675ea834
commit
bd3d58484a
7 changed files with 48 additions and 69 deletions
|
@ -100,18 +100,16 @@ void ColumnString::render (
|
|||
std::vector <std::string> raw;
|
||||
wrapText (raw, value, width, _hyphenate);
|
||||
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = raw.begin (); i != raw.end (); ++i)
|
||||
lines.push_back (color.colorize (leftJustify (*i, width)));
|
||||
for (auto& i : raw)
|
||||
lines.push_back (color.colorize (leftJustify (i, width)));
|
||||
}
|
||||
else if (_style == "right")
|
||||
{
|
||||
std::vector <std::string> raw;
|
||||
wrapText (raw, value, width, _hyphenate);
|
||||
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = raw.begin (); i != raw.end (); ++i)
|
||||
lines.push_back (color.colorize (rightJustify (*i, width)));
|
||||
for (auto& i : raw)
|
||||
lines.push_back (color.colorize (rightJustify (i, width)));
|
||||
}
|
||||
else if (_style == "left_fixed")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue