From 05ae63e40a0bae7fa34e3be8edf0d3ed5092584a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 4 Nov 2018 14:54:53 +0100 Subject: [PATCH] Use standard naming convention for RowToTreeNodeJob members Prefix them with "m_" to indicate that they're member variables. No real changes. --- src/generic/datavgen.cpp | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 2e1d1887e1..1ad0120fb3 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3468,31 +3468,28 @@ int wxDataViewMainWindow::GetLineHeight( unsigned int row ) const class RowToTreeNodeJob: public DoJob { public: - RowToTreeNodeJob( unsigned int row_ , int current_, wxDataViewTreeNode * node ) + RowToTreeNodeJob(unsigned int row, int current, wxDataViewTreeNode *parent) + : m_row(row), m_current(current), m_parent(parent), m_ret(NULL) { - this->row = row_; - this->current = current_; - ret = NULL; - parent = node; } virtual int operator() ( wxDataViewTreeNode * node ) wxOVERRIDE { - current ++; - if( current == static_cast(row)) + m_current ++; + if( m_current == static_cast(m_row)) { - ret = node; + m_ret = node; return DoJob::DONE; } - if( node->GetSubTreeCount() + current < static_cast(row) ) + if( node->GetSubTreeCount() + m_current < static_cast(m_row) ) { - current += node->GetSubTreeCount(); + m_current += node->GetSubTreeCount(); return DoJob::SKIP_SUBTREE; } else { - parent = node; + m_parent = node; // If the current node has only leaf children, we can find the // desired node directly. This can speed up finding the node @@ -3500,8 +3497,8 @@ public: if ( node->HasChildren() && (int)node->GetChildNodes().size() == node->GetSubTreeCount() ) { - const int index = static_cast(row) - current - 1; - ret = node->GetChildNodes()[index]; + const int index = static_cast(m_row) - m_current - 1; + m_ret = node->GetChildNodes()[index]; return DoJob::DONE; } @@ -3510,13 +3507,13 @@ public: } wxDataViewTreeNode * GetResult() const - { return ret; } + { return m_ret; } private: - unsigned int row; - int current; - wxDataViewTreeNode * ret; - wxDataViewTreeNode * parent; + unsigned int m_row; + int m_current; + wxDataViewTreeNode* m_parent; + wxDataViewTreeNode* m_ret; }; wxDataViewTreeNode * wxDataViewMainWindow::GetTreeNodeByRow(unsigned int row) const