# HG changeset patch # User Rik # Date 1631504450 25200 # Node ID f015d7228e3d80ad5aed106f6c5e588d82b14997 # Parent 9c4e8c3bf41d83e708a91b8e50ac9a0cecb5c42a 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. diff -r 9c4e8c3bf41d -r f015d7228e3d liboctave/array/Array-util.cc --- 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