From d5a93fda417df4ee2d0a201e23f657e8963cbda2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 31 Jan 2005 22:15:11 +0000 Subject: [PATCH] apparently unneeded temporary iterator variable removed (patch 1096066) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/docview.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 7fa1b72..551e02f 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -187,17 +187,15 @@ bool wxDocument::DeleteAllViews() for ( it = m_documentViews.begin(), en = m_documentViews.end(); it != en; - ) + ++it ) { wxView *view = (wxView *)*it; if (!view->Close()) return false; - wxList::iterator next = it; ++next; - delete view; // Deletes node implicitly - it = next; } + // If we haven't yet deleted the document (for example // if there were no views) then delete it. if (manager && manager->GetDocuments().Member(this)) -- 2.7.4