From 09a472e3eff98adb7acb0936162561d12bc38bcf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 23 Mar 2022 13:35:41 +0100 Subject: [PATCH] Hide wxGenericDataViewCtrl helpers in anonymous namespace This is a good idea anyhow, as these classes don't need to have extern linkage and so shouldn't have it, and it also fixes some gcc 11 -Wsubobject-linkage warnings. --- src/generic/datavgen.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 55f6cdce77..787278068d 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3816,6 +3816,9 @@ int wxDataViewMainWindow::QueryAndCacheLineHeight(unsigned int row, wxDataViewIt } +namespace +{ + class RowToTreeNodeJob: public DoJob { public: @@ -3868,6 +3871,8 @@ private: wxDataViewTreeNode* m_ret; }; +} // anonymous namespace + // wxDataViewTreeNode * wxDataViewMainWindow::GetTreeNodeByRow(unsigned int row) const { wxASSERT( !IsVirtualList() ); @@ -4260,6 +4265,9 @@ int wxDataViewMainWindow::RecalculateCount() const } } +namespace +{ + class ItemToRowJob : public DoJob { public: @@ -4309,6 +4317,8 @@ private: }; +} // anonymous namespace + int wxDataViewMainWindow::GetRowByItem(const wxDataViewItem & item, WalkFlags flags) const