Simplify check for whether wxSizerItem window is null
No real changes, just write the check more compactly and without redundant IsWindow() check.
This commit is contained in:
@@ -878,8 +878,8 @@ bool wxSizer::Replace( size_t old, wxSizerItem *newitem )
|
||||
wxSizerItem *item = node->GetData();
|
||||
node->SetData(newitem);
|
||||
|
||||
if (item->IsWindow() && item->GetWindow())
|
||||
item->GetWindow()->SetContainingSizer(NULL);
|
||||
if (wxWindow* const w = item->GetWindow())
|
||||
w->SetContainingSizer(NULL);
|
||||
|
||||
delete item;
|
||||
|
||||
|
Reference in New Issue
Block a user