diff options
author | Kurtis Rader <krader@skepticism.us> | 2016-05-04 15:19:47 -0700 |
---|---|---|
committer | Kurtis Rader <krader@skepticism.us> | 2016-05-04 15:32:04 -0700 |
commit | 79f342b954a6f47ee3f1277a899066a654e7c330 (patch) | |
tree | a9386ce1e108a5c046276e4266e0129404fc4ea0 /src/output.cpp | |
parent | 527e5f52ba5a097a24490065fea23b4627032e4c (diff) |
lint cleanup: eliminate "redundant" errors
This removes some pointless parentheses but the primary focus is removing
redundancies like unnecessary "else" clauses.
Diffstat (limited to 'src/output.cpp')
-rw-r--r-- | src/output.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/output.cpp b/src/output.cpp index 935efe96..78ea210b 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -58,9 +58,8 @@ void output_set_color_support(color_support_t val) { color_support = val; } unsigned char index_for_color(rgb_color_t c) { if (c.is_named() || !(output_get_color_support() & color_support_term256)) { return c.to_name_index(); - } else { - return c.to_term256_index(); } + return c.to_term256_index(); } static bool write_color_escape(char *todo, unsigned char idx, bool is_fg) { @@ -95,9 +94,8 @@ static bool write_foreground_color(unsigned char idx) { return write_color_escape(set_a_foreground, idx, true); } else if (set_foreground && set_foreground[0]) { return write_color_escape(set_foreground, idx, true); - } else { - return false; } + return false; } static bool write_background_color(unsigned char idx) { @@ -105,9 +103,8 @@ static bool write_background_color(unsigned char idx) { return write_color_escape(set_a_background, idx, false); } else if (set_background && set_background[0]) { return write_color_escape(set_background, idx, false); - } else { - return false; } + return false; } void write_color(rgb_color_t color, bool is_fg) { |