Mercurial > octave
changeset 30161:f015d7228e3d
maint: Convert "struct sub2ind_helper" to "class sub2ind_helper"
* Array-util.cc: Change type of sub2ind_helper from "struct" to "class". Place
member variables ind, n in new private section.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 12 Sep 2021 20:40:50 -0700 |
parents | 9c4e8c3bf41d |
children | 5acddd64527e |
files | liboctave/array/Array-util.cc |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/Array-util.cc Sun Sep 12 20:31:03 2021 -0700 +++ b/liboctave/array/Array-util.cc Sun Sep 12 20:40:50 2021 -0700 @@ -521,16 +521,16 @@ } // A helper class. -struct sub2ind_helper +class sub2ind_helper { public: - sub2ind_helper (octave_idx_type *_ind, octave_idx_type _n) - : ind (_ind), n (_n) { } + sub2ind_helper (octave_idx_type *ind, octave_idx_type n) + : m_ind (ind), m_n (n) { } - void operator () (octave_idx_type k) { (*ind++ *= n) += k; } + void operator () (octave_idx_type k) { (*m_ind++ *= m_n) += k; } - //-------- - octave_idx_type *ind, n; +private: + octave_idx_type *m_ind, m_n; }; octave::idx_vector