From 5666feaab977544de4529e98deed296fb8dcb39a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 20 Feb 2016 23:10:23 -0500 Subject: [PATCH] CFS, Msg, ViewText: Code cleanup --- src/FS.cpp | 2 -- src/Msg.cpp | 5 ++--- src/ViewText.cpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/FS.cpp b/src/FS.cpp index 164d803f4..04a84b80b 100644 --- a/src/FS.cpp +++ b/src/FS.cpp @@ -546,9 +546,7 @@ void File::write_raw (const std::string& line) open (); if (_fh) - { fputs (line.c_str (), _fh); - } } //////////////////////////////////////////////////////////////////////////////// diff --git a/src/Msg.cpp b/src/Msg.cpp index 071d7500a..7f73858c4 100644 --- a/src/Msg.cpp +++ b/src/Msg.cpp @@ -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); diff --git a/src/ViewText.cpp b/src/ViewText.cpp index 37514ba4c..07502e9ea 100644 --- a/src/ViewText.cpp +++ b/src/ViewText.cpp @@ -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