X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3996b21a7f11ae6c1985b5ee55223ddec537f689..0738b901b17340f09766524b8d9d79e9ed1268e7:/src/generic/infobar.cpp diff --git a/src/generic/infobar.cpp b/src/generic/infobar.cpp index 2cc7b5e164..5f6c948bb0 100644 --- a/src/generic/infobar.cpp +++ b/src/generic/infobar.cpp @@ -28,6 +28,7 @@ #ifndef WX_PRECOMP #include "wx/bmpbuttn.h" #include "wx/button.h" + #include "wx/dcmemory.h" #include "wx/settings.h" #include "wx/statbmp.h" #include "wx/stattext.h" @@ -170,10 +171,13 @@ wxInfoBarGeneric::BarPlacement wxInfoBarGeneric::GetBarPlacement() const if ( !sizer ) return BarPlacement_Unknown; + // FIXME-VC6: can't compare "const wxInfoBarGeneric *" and "wxWindow *", + // so need this workaround + wxWindow * const self = const_cast(this); const wxSizerItemList& siblings = sizer->GetChildren(); - if ( siblings.GetFirst()->GetData()->GetWindow() == this ) + if ( siblings.GetFirst()->GetData()->GetWindow() == self ) return BarPlacement_Top; - else if ( siblings.GetLast()->GetData()->GetWindow() == this ) + else if ( siblings.GetLast()->GetData()->GetWindow() == self ) return BarPlacement_Bottom; else return BarPlacement_Unknown;