Mercurial > octave
changeset 30132:72afd5cd4a0c
maint: use "m_" prefix for member variables in class octave_cell.
* ov-cell.cc, ov-cell.h: use "m_" prefix for member variables in class
octave_cell.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 07 Sep 2021 14:39:08 -0700 |
parents | a471bf0f78ba |
children | 938794bc82b7 |
files | libinterp/octave-value/ov-cell.cc libinterp/octave-value/ov-cell.h |
diffstat | 2 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-cell.cc Sat Sep 04 07:50:08 2021 -0400 +++ b/libinterp/octave-value/ov-cell.cc Tue Sep 07 14:39:08 2021 -0700 @@ -431,14 +431,14 @@ octave_cell::iscellstr (void) const { bool retval; - if (cellstr_cache.get ()) + if (m_cellstr_cache.get ()) retval = true; else { retval = matrix.iscellstr (); // Allocate empty cache to mark that this is indeed a cellstr. if (retval) - cellstr_cache.reset (new Array<std::string> ()); + m_cellstr_cache.reset (new Array<std::string> ()); } return retval; @@ -638,10 +638,10 @@ if (! iscellstr ()) error ("invalid conversion from cell array to array of strings"); - if (cellstr_cache->isempty ()) - *cellstr_cache = matrix.cellstr_value (); + if (m_cellstr_cache->isempty ()) + *m_cellstr_cache = matrix.cellstr_value (); - return *cellstr_cache; + return *m_cellstr_cache; } bool
--- a/libinterp/octave-value/ov-cell.h Sat Sep 04 07:50:08 2021 -0400 +++ b/libinterp/octave-value/ov-cell.h Tue Sep 07 14:39:08 2021 -0700 @@ -52,17 +52,17 @@ public: octave_cell (void) - : octave_base_matrix<Cell> (), cellstr_cache () { } + : octave_base_matrix<Cell> (), m_cellstr_cache () { } octave_cell (const Cell& c) - : octave_base_matrix<Cell> (c), cellstr_cache () { } + : octave_base_matrix<Cell> (c), m_cellstr_cache () { } octave_cell (const Array<std::string>& str) : octave_base_matrix<Cell> (Cell (str)), - cellstr_cache (new Array<std::string> (str)) { } + m_cellstr_cache (new Array<std::string> (str)) { } octave_cell (const octave_cell& c) - : octave_base_matrix<Cell> (c), cellstr_cache () { } + : octave_base_matrix<Cell> (c), m_cellstr_cache () { } ~octave_cell (void) = default; @@ -183,9 +183,11 @@ private: void clear_cellstr_cache (void) const - { cellstr_cache.reset (); } + { m_cellstr_cache.reset (); } - mutable std::unique_ptr<Array<std::string>> cellstr_cache; + //-------- + + mutable std::unique_ptr<Array<std::string>> m_cellstr_cache; DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA };