From a95293d5f9a08851aef5ddd6fd866f0e519f93d5 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Tue, 8 Jan 2019 22:24:06 +0100 Subject: [PATCH] Iterate over all items of wxVector with header columns with iterator --- src/propgrid/manager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 51556e6eb2..4465d08bd4 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -242,8 +242,11 @@ public: virtual ~wxPGHeaderCtrl() { - for (size_t i = 0; i < m_columns.size(); i++ ) - delete m_columns[i]; + for (wxVector::const_iterator it = m_columns.begin(); + it != m_columns.end(); ++it) + { + delete *it; + } } void OnPageChanged(const wxPropertyGridPage* page)