mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
CFS, Msg, ViewText: Code cleanup
This commit is contained in:
parent
a1dbb0c294
commit
5666feaab9
3 changed files with 3 additions and 6 deletions
|
|
@ -546,9 +546,7 @@ void File::write_raw (const std::string& line)
|
|||
open ();
|
||||
|
||||
if (_fh)
|
||||
{
|
||||
fputs (line.c_str (), _fh);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ std::string Msg::serialize () const
|
|||
output += i.first + ": " + i.second + "\n";
|
||||
|
||||
output += "\n" + _payload + "\n";
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
|
|
@ -96,10 +95,10 @@ bool Msg::parse (const std::string& input)
|
|||
{
|
||||
auto delimiter = i.find (':');
|
||||
if (delimiter == std::string::npos)
|
||||
throw std::string ("ERROR: Malformed message header '") + i + "'";
|
||||
throw std::string ("ERROR: Malformed message header '") + i + "'";
|
||||
|
||||
_header[Lexer::trim (i.substr (0, delimiter))] = Lexer::trim (i.substr (delimiter + 1));
|
||||
}
|
||||
}
|
||||
|
||||
// Parse payload.
|
||||
_payload = input.substr (separator + 2);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ std::string ViewText::render ()
|
|||
unsigned int ideal = 0;
|
||||
_columns[col]->measure (_data[row][col], min, ideal);
|
||||
|
||||
if (min > global_min) global_min = min;
|
||||
if (min > global_min) global_min = min;
|
||||
if (ideal > global_ideal) global_ideal = ideal;
|
||||
|
||||
// If a fixed-width column was just measured, there is no point repeating
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue