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();
|
wxSizerItem *item = node->GetData();
|
||||||
node->SetData(newitem);
|
node->SetData(newitem);
|
||||||
|
|
||||||
if (item->IsWindow() && item->GetWindow())
|
if (wxWindow* const w = item->GetWindow())
|
||||||
item->GetWindow()->SetContainingSizer(NULL);
|
w->SetContainingSizer(NULL);
|
||||||
|
|
||||||
delete item;
|
delete item;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user