wxDFB wxUSE_STL compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -24,9 +24,15 @@
|
||||
WX_DECLARE_LIST(wxFontInstance, wxFontInstanceList);
|
||||
WX_DEFINE_LIST(wxFontInstanceList)
|
||||
WX_DEFINE_LIST(wxFontBundleList)
|
||||
|
||||
WX_DECLARE_HASH_MAP(wxString, wxFontBundle*,
|
||||
wxStringHash, wxStringEqual,
|
||||
wxFontBundleHash);
|
||||
wxFontBundleHashBase);
|
||||
// in STL build, hash class is typedef to a template, so it can't be forward
|
||||
// declared, as we do; solve it by having a dummy class:
|
||||
class wxFontBundleHash : public wxFontBundleHashBase
|
||||
{
|
||||
};
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
@@ -65,17 +71,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user