removed unnecessary code from wxResourceCache dtor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-07-03 17:02:29 +00:00
parent 122e8c139e
commit 8dbef32aaf

View File

@@ -604,7 +604,8 @@ wxFont *wxFontList::FindOrCreateFont(int pointSize,
wxFontEncoding encoding)
{
wxFont *font = (wxFont *)NULL;
for ( wxNode * node = First(); node; node = node->Next() )
wxNode *node;
for ( node = First(); node; node = node->Next() )
{
font = (wxFont *)node->Data();
if ( font->GetVisible() &&
@@ -687,29 +688,10 @@ wxResourceCache::~wxResourceCache ()
{
wxNode *node = First ();
while (node) {
wxGDIObject *item = (wxGDIObject *)node->Data();
if (item->IsKindOf(CLASSINFO(wxBrush))) {
wxBrush *brush = (wxBrush *)item;
delete brush;
}
wxObject *item = (wxObject *)node->Data();
delete item;
if (item->IsKindOf(CLASSINFO(wxFont))) {
wxFont *font = (wxFont *)item;
delete font;
}
if (item->IsKindOf(CLASSINFO(wxBitmap))) {
wxBitmap *bitmap = (wxBitmap *)item;
delete bitmap;
}
if (item->IsKindOf(CLASSINFO(wxColour))) {
wxColour *colour = (wxColour *)item;
delete colour;
}
wxNode *next = node->Next ();
node = next;
node = node->Next ();
}
}