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
This commit is contained in:
@@ -187,17 +187,15 @@ bool wxDocument::DeleteAllViews()
|
|||||||
|
|
||||||
for ( it = m_documentViews.begin(), en = m_documentViews.end();
|
for ( it = m_documentViews.begin(), en = m_documentViews.end();
|
||||||
it != en;
|
it != en;
|
||||||
)
|
++it )
|
||||||
{
|
{
|
||||||
wxView *view = (wxView *)*it;
|
wxView *view = (wxView *)*it;
|
||||||
if (!view->Close())
|
if (!view->Close())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
wxList::iterator next = it; ++next;
|
|
||||||
|
|
||||||
delete view; // Deletes node implicitly
|
delete view; // Deletes node implicitly
|
||||||
it = next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we haven't yet deleted the document (for example
|
// If we haven't yet deleted the document (for example
|
||||||
// if there were no views) then delete it.
|
// if there were no views) then delete it.
|
||||||
if (manager && manager->GetDocuments().Member(this))
|
if (manager && manager->GetDocuments().Member(this))
|
||||||
|
Reference in New Issue
Block a user