1. renamed wxFontMapper::IsWxFontMapper() to IsDummy() (with reverse semantics)
2. added wxFontMapper::Reset() to only do the cast needed when deleting the font mapper object once 3. reset the dummy font mapper created during the app initialization in wxFontMapperModule and not in init.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -160,17 +160,17 @@ wxFontMapper::~wxFontMapper()
|
||||
{
|
||||
}
|
||||
|
||||
bool wxFontMapper::IsWxFontMapper()
|
||||
{ return true; }
|
||||
|
||||
/* static */
|
||||
wxFontMapper *wxFontMapper::Get()
|
||||
{
|
||||
wxFontMapperBase *fontmapper = wxFontMapperBase::Get();
|
||||
wxASSERT_MSG(fontmapper->IsWxFontMapper(), wxT("GUI code requested a wxFontMapper but we only have a wxFontMapperBase."));
|
||||
wxASSERT_MSG( !fontmapper->IsDummy(),
|
||||
wxT("GUI code requested a wxFontMapper but we only have a wxFontMapperBase.") );
|
||||
|
||||
// Now return it anyway because there's a chance the GUI code might just
|
||||
// only want to call wxFontMapperBase functions.
|
||||
return (wxFontMapper*)fontmapper;
|
||||
// only want to call wxFontMapperBase functions and it's better than
|
||||
// crashing by returning NULL
|
||||
return (wxFontMapper *)fontmapper;
|
||||
}
|
||||
|
||||
wxFontEncoding
|
||||
|
||||
Reference in New Issue
Block a user