CFS, Msg, ViewText: Code cleanup

This commit is contained in:
Paul Beckingham 2016-02-20 23:10:23 -05:00
parent a1dbb0c294
commit 5666feaab9
3 changed files with 3 additions and 6 deletions

View file

@ -546,9 +546,7 @@ void File::write_raw (const std::string& line)
open ();
if (_fh)
{
fputs (line.c_str (), _fh);
}
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -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);

View file

@ -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