Mercurial > octave
changeset 30040:805357e6b058
maint: use "m_" prefix for member variables of graphics objects.
* graphics.in.h (patch::properties): Rename variables to "m_bad_data_msg" and
"m_coplanar_last_idx".
* graphics.in.h (scatter::properties): Rename variable to "m_bad_data_msg".
* graphics.in.h (uicontextmenu::properties): Rename variable to "m_dependent_obj_list".
* gl-render.cc: Rename occurrences of "coplanar_last_idx".
* graphics.cc: Rename occurrences of "bad_data_msg", "coplanar_last_idx".
author | Rik <rik@octave.org> |
---|---|
date | Wed, 25 Aug 2021 09:17:48 -0700 |
parents | f16cfb2d7d1b |
children | f148aff802b6 |
files | libinterp/corefcn/gl-render.cc libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h |
diffstat | 3 files changed, 29 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.cc Wed Aug 25 08:26:09 2021 -0700 +++ b/libinterp/corefcn/gl-render.cc Wed Aug 25 09:17:48 2021 -0700 @@ -3397,11 +3397,11 @@ continue; bool is_non_planar = false; - if (props.coplanar_last_idx.size () > 0 - && props.coplanar_last_idx[i].size () > 1) + if (props.m_coplanar_last_idx.size () > 0 + && props.m_coplanar_last_idx[i].size () > 1) { is_non_planar = true; - it = props.coplanar_last_idx[i].end (); + it = props.m_coplanar_last_idx[i].end (); it--; } @@ -3411,7 +3411,7 @@ if (is_non_planar) { i_end = *it; - if (it == props.coplanar_last_idx[i].begin ()) + if (it == props.m_coplanar_last_idx[i].begin ()) i_start = 0; else { @@ -3529,8 +3529,8 @@ for (int i = 0; i < nf; i++) { bool is_non_planar = false; - if (props.coplanar_last_idx.size () > 0 - && props.coplanar_last_idx[i].size () > 1) + if (props.m_coplanar_last_idx.size () > 0 + && props.m_coplanar_last_idx[i].size () > 1) is_non_planar = true; if (clip_f(i) || is_non_planar) {
--- a/libinterp/corefcn/graphics.cc Wed Aug 25 08:26:09 2021 -0700 +++ b/libinterp/corefcn/graphics.cc Wed Aug 25 09:17:48 2021 -0700 @@ -9718,11 +9718,11 @@ Matrix zd = get_zdata ().matrix_value (); NDArray cd = get_cdata ().array_value (); - bad_data_msg = ""; + m_bad_data_msg = ""; if (xd.dims () != yd.dims () || (xd.dims () != zd.dims () && ! zd.isempty ())) { - bad_data_msg = "x/y/zdata must have the same dimensions"; + m_bad_data_msg = "x/y/zdata must have the same dimensions"; return; } @@ -9900,10 +9900,10 @@ octave_idx_type nvert = vert.rows (); // Check all vertices in faces are defined - bad_data_msg = ""; + m_bad_data_msg = ""; if (static_cast<double> (nvert) < idx.row_max ().max ()) { - bad_data_msg = R"(some vertices in "faces" property are undefined)"; + m_bad_data_msg = R"(some vertices in "faces" property are undefined)"; return; } @@ -9932,7 +9932,7 @@ if (fcmax > 3 && vert.columns () > 2 && ! (facecolor_is ("none") && edgecolor_is ("none"))) { - coplanar_last_idx.resize (idx.columns ()); + m_coplanar_last_idx.resize (idx.columns ()); for (octave_idx_type jj = 0; jj < idx.columns (); jj++) { if (octave::math::isnan (idx(3,jj))) @@ -9960,11 +9960,11 @@ if (is_unclosed) continue; - coplanar_last_idx[jj] = coplanar_partition (vert, idx, nc, jj); - } - } - else - coplanar_last_idx.resize (0); + m_coplanar_last_idx[jj] = coplanar_partition (vert, idx, nc, jj); + } + } + else + m_coplanar_last_idx.resize (0); // Build cdata dim_vector dv = dim_vector::alloc (3); @@ -10062,7 +10062,7 @@ for (octave_idx_type i = 0; i < num_f; i++) { bool is_coplanar = true; - if (coplanar_last_idx.size () > 0 && coplanar_last_idx[i].size () > 1) + if (m_coplanar_last_idx.size () > 0 && m_coplanar_last_idx[i].size () > 1) is_coplanar = false; // get number of corners @@ -10301,11 +10301,11 @@ Matrix cd = get_cdata ().matrix_value (); Matrix sd = get_sizedata ().matrix_value (); - bad_data_msg = ""; + m_bad_data_msg = ""; if (xd.dims () != yd.dims () || (xd.dims () != zd.dims () && ! zd.isempty ())) { - bad_data_msg = "x/y/zdata must have the same dimensions"; + m_bad_data_msg = "x/y/zdata must have the same dimensions"; return; } @@ -10316,7 +10316,7 @@ if (! cd.isempty () && (c_rows != 1 || c_cols != 3) && (c_rows != x_rows || (c_cols != 1 && c_cols != 3))) { - bad_data_msg = "cdata must be an rgb triplet or have the same number of " + m_bad_data_msg = "cdata must be an rgb triplet or have the same number of " "rows as X and one or three columns"; return; } @@ -10324,7 +10324,7 @@ octave_idx_type s_rows = sd.rows (); if (s_rows != 1 && s_rows != x_rows) { - bad_data_msg = "sizedata must be a scalar or a vector with the same " + m_bad_data_msg = "sizedata must be a scalar or a vector with the same " "dimensions as X"; return; }
--- a/libinterp/corefcn/graphics.in.h Wed Aug 25 08:26:09 2021 -0700 +++ b/libinterp/corefcn/graphics.in.h Wed Aug 25 09:17:48 2021 -0700 @@ -4946,7 +4946,7 @@ // The patch should then be ignored by the renderer. bool has_bad_data (std::string& msg) const { - msg = bad_data_msg; + msg = m_bad_data_msg; return ! msg.empty (); } @@ -4962,7 +4962,7 @@ OCTINTERP_API bool get_do_lighting (void) const; - std::vector<std::vector<octave_idx_type>> coplanar_last_idx; + std::vector<std::vector<octave_idx_type>> m_coplanar_last_idx; // See the genprops.awk script for an explanation of the // properties declarations. @@ -5071,7 +5071,7 @@ private: - std::string bad_data_msg; + std::string m_bad_data_msg; void update_faces (void) { update_data ();} @@ -5219,7 +5219,7 @@ // The scatter object should then be ignored by the renderer. bool has_bad_data (std::string& msg) const { - msg = bad_data_msg; + msg = m_bad_data_msg; return ! msg.empty (); } @@ -5328,7 +5328,7 @@ OCTINTERP_API void update_color (void); private: - std::string bad_data_msg; + std::string m_bad_data_msg; void update_xdata (void) { @@ -5820,12 +5820,12 @@ public: void add_dependent_obj (graphics_handle gh) - { dependent_obj_list.push_back (gh); } + { m_dependent_obj_list.push_back (gh); } // FIXME: the list may contain duplicates. // Should we return only unique elements? const std::list<graphics_handle> get_dependent_obj_list (void) - { return dependent_obj_list; } + { return m_dependent_obj_list; } // See the genprops.awk script for an explanation of the // properties declarations. @@ -5849,7 +5849,7 @@ private: // List of objects that might depend on this uicontextmenu object - std::list<graphics_handle> dependent_obj_list; + std::list<graphics_handle> m_dependent_obj_list; OCTINTERP_API void update_beingdeleted (void);