From 8140f74d75ac51baf1c5705afefa318b686c90ee Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Wed, 20 Jul 2016 22:43:48 -0700 Subject: [PATCH] simplify oclint error suppression for scoped_buffer_t --- .oclint | 2 +- src/screen.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.oclint b/.oclint index 794b294ba..ad9e01d21 100644 --- a/.oclint +++ b/.oclint @@ -24,7 +24,7 @@ rule-configurations: # RAII behavior so the local vars are actually used. # - key: RAII_CUSTOM_CLASSES - value: scoped_lock + value: scoped_lock scoped_buffer_t disable-rules: # diff --git a/src/screen.cpp b/src/screen.cpp index a34d7c98b..5bd6de1f3 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -472,7 +472,7 @@ static void s_move(screen_t *s, data_buffer_t *b, int new_x, int new_y) { s->screen_cursor[0], s->screen_cursor[1], new_x, new_y ); */ - scoped_buffer_t scoped_buffer(b); //!OCLINT(has side effects) + scoped_buffer_t scoped_buffer(b); y_steps = new_y - s->actual.cursor.y; @@ -528,7 +528,7 @@ static void s_move(screen_t *s, data_buffer_t *b, int new_x, int new_y) { /// Set the pen color for the terminal. static void s_set_color(screen_t *s, data_buffer_t *b, highlight_spec_t c) { - scoped_buffer_t scoped_buffer(b); //!OCLINT(has side effects) + scoped_buffer_t scoped_buffer(b); unsigned int uc = (unsigned int)c; set_color(highlight_get_color(uc & 0xffff, false), @@ -537,7 +537,7 @@ static void s_set_color(screen_t *s, data_buffer_t *b, highlight_spec_t c) { /// Convert a wide character to a multibyte string and append it to the buffer. static void s_write_char(screen_t *s, data_buffer_t *b, wchar_t c) { - scoped_buffer_t scoped_buffer(b); //!OCLINT(has side effects) + scoped_buffer_t scoped_buffer(b); s->actual.cursor.x += fish_wcwidth_min_0(c); writech(c); if (s->actual.cursor.x == s->actual_width && allow_soft_wrap()) { @@ -554,13 +554,13 @@ static void s_write_char(screen_t *s, data_buffer_t *b, wchar_t c) { /// Send the specified string through tputs and append the output to the specified buffer. static void s_write_mbs(data_buffer_t *b, char *s) { - scoped_buffer_t scoped_buffer(b); //!OCLINT(has side effects) + scoped_buffer_t scoped_buffer(b); writembs(s); } /// Convert a wide string to a multibyte string and append it to the buffer. static void s_write_str(data_buffer_t *b, const wchar_t *s) { - scoped_buffer_t scoped_buffer(b); //!OCLINT(has side effects) + scoped_buffer_t scoped_buffer(b); writestr(s); }