From c712f3a7016f7f33c6ed8766db41b1fd3c4a25a1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 21 Jul 2008 17:17:20 +0000 Subject: [PATCH] compilation fix for wxDFB STL build (#9753) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/fontmgrcmn.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/common/fontmgrcmn.cpp b/src/common/fontmgrcmn.cpp index 6a5d0683ec..5d94bbc723 100644 --- a/src/common/fontmgrcmn.cpp +++ b/src/common/fontmgrcmn.cpp @@ -65,17 +65,14 @@ wxFontInstance *wxFontFaceBase::GetFontInstance(float ptSize, bool aa) { wxASSERT_MSG( m_refCnt > 0, _T("font library not loaded!") ); - wxFontInstance *i; - wxFontInstanceList::Node *node; - - for ( node = m_instances->GetFirst(); node; node = node->GetNext() ) + for ( wxFontInstanceList::const_iterator i = m_instances->begin(); + i != m_instances->end(); ++i ) { - i = node->GetData(); - if ( i->GetPointSize() == ptSize && i->IsAntiAliased() == aa ) - return i; + if ( (*i)->GetPointSize() == ptSize && (*i)->IsAntiAliased() == aa ) + return *i; } - i = CreateFontInstance(ptSize, aa); + wxFontInstance *i = CreateFontInstance(ptSize, aa); m_instances->Append(i); return i; }