VC6 apparently can't compare const pointer to derived class with a non-const
pointer to the base class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62315
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( !sizer )
return BarPlacement_Unknown;
if ( !sizer )
return BarPlacement_Unknown;
+ // FIXME-VC6: can't compare "const wxInfoBarGeneric *" and "wxWindow *",
+ // so need this workaround
+ wxWindow * const self = const_cast<wxInfoBarGeneric *>(this);
const wxSizerItemList& siblings = sizer->GetChildren();
const wxSizerItemList& siblings = sizer->GetChildren();
- if ( siblings.GetFirst()->GetData()->GetWindow() == this )
+ if ( siblings.GetFirst()->GetData()->GetWindow() == self )
- else if ( siblings.GetLast()->GetData()->GetWindow() == this )
+ else if ( siblings.GetLast()->GetData()->GetWindow() == self )
return BarPlacement_Bottom;
else
return BarPlacement_Unknown;
return BarPlacement_Bottom;
else
return BarPlacement_Unknown;