# HG changeset patch # User Rik # Date 1631243521 25200 # Node ID 870687a59e968bea47f90d4139463fbe6d3ec018 # Parent 4f039927308bff167d7dce32c05a4fd456d92436 maint: use "s_" prefix for static variables in class octave_base_value. * ov-base.cc, ov-base.h: Use "s_" prefix for static variables in class octave_base_value. diff -r 4f039927308b -r 870687a59e96 libinterp/octave-value/ov-base.cc --- a/libinterp/octave-value/ov-base.cc Thu Sep 09 20:07:29 2021 -0700 +++ b/libinterp/octave-value/ov-base.cc Thu Sep 09 20:12:01 2021 -0700 @@ -1343,10 +1343,10 @@ } // Current indentation. -int octave_base_value::curr_print_indent_level = 0; +int octave_base_value::s_curr_print_indent_level = 0; // TRUE means we are at the beginning of a line. -bool octave_base_value::beginning_of_line = true; +bool octave_base_value::s_beginning_of_line = true; // Each print() function should call this before printing anything. // @@ -1355,17 +1355,17 @@ void octave_base_value::indent (std::ostream& os) const { - assert (curr_print_indent_level >= 0); + assert (s_curr_print_indent_level >= 0); - if (beginning_of_line) + if (s_beginning_of_line) { // FIXME: do we need this? // os << prefix; - for (int i = 0; i < curr_print_indent_level; i++) + for (int i = 0; i < s_curr_print_indent_level; i++) os << ' '; - beginning_of_line = false; + s_beginning_of_line = false; } } @@ -1376,7 +1376,7 @@ { os << "\n"; - beginning_of_line = true; + s_beginning_of_line = true; } // For resetting print state. @@ -1384,8 +1384,8 @@ void octave_base_value::reset (void) const { - beginning_of_line = true; - curr_print_indent_level = 0; + s_beginning_of_line = true; + s_curr_print_indent_level = 0; } octave_value diff -r 4f039927308b -r 870687a59e96 libinterp/octave-value/ov-base.h --- a/libinterp/octave-value/ov-base.h Thu Sep 09 20:07:29 2021 -0700 +++ b/libinterp/octave-value/ov-base.h Thu Sep 09 20:12:01 2021 -0700 @@ -873,16 +873,16 @@ const octave_value& rhs); void reset_indent_level (void) const - { curr_print_indent_level = 0; } + { s_curr_print_indent_level = 0; } void increment_indent_level (void) const - { curr_print_indent_level += 2; } + { s_curr_print_indent_level += 2; } void decrement_indent_level (void) const - { curr_print_indent_level -= 2; } + { s_curr_print_indent_level -= 2; } int current_print_indent_level (void) const - { return curr_print_indent_level; } + { return s_curr_print_indent_level; } OCTINTERP_API void indent (std::ostream& os) const; @@ -905,8 +905,10 @@ OCTINTERP_API void wrong_type_arg_error (void) const; - static int curr_print_indent_level; - static bool beginning_of_line; + //-------- + + static int s_curr_print_indent_level; + static bool s_beginning_of_line; DECLARE_OV_BASE_TYPEID_FUNCTIONS_AND_DATA };