From: Włodzimierz Skiba Date: Fri, 6 May 2005 06:09:24 +0000 (+0000) Subject: VC warning fixes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3d104ec3570c714e770784003d6eafe9f9226d9a VC warning fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/main.cpp b/src/msw/main.cpp index e393c80815..76b9064c08 100644 --- a/src/msw/main.cpp +++ b/src/msw/main.cpp @@ -219,8 +219,11 @@ int wxEntry(int& argc, wxChar **argv) { wxFatalExit(); - // this code is unreachable but put it here to suppress warnings +#ifndef __VISUALC__ + // this code is unreachable but put it here to suppress warnings in some compilers + // and disable for others to supress warnings too return -1; +#endif // !__VISUALC__ } } diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 50e27bae8d..21fb1fd4f4 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -552,13 +552,13 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) // if our parent had prepared a defer window handle for us, use it (unless // we are a top level window) - wxWindowMSW *parent = GetParent(); #if USE_DEFERRED_SIZING + wxWindowMSW *parent = GetParent(); HDWP hdwp = parent && !IsTopLevel() ? (HDWP)parent->m_hDWP : NULL; #else HDWP hdwp = 0; -#endif +#endif wxMoveWindowDeferred(hdwp, this, GetHwnd(), xx, yy, width, height); diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 606772143f..39960aed32 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -394,7 +394,7 @@ bool wxSpinCtrl::Create(wxWindow *parent, // associate the text window with the spin button (void)::SendMessage(GetHwnd(), UDM_SETBUDDY, (WPARAM)m_hwndBuddy, 0); - if ( !value.IsEmpty() ) + if ( !value.empty() ) { SetValue(value); } @@ -438,7 +438,7 @@ int wxSpinCtrl::GetValue() const long n; if ( (wxSscanf(val, wxT("%lu"), &n) != 1) ) n = INT_MIN; - + if (n < m_min) n = m_min; if (n > m_max) n = m_max; @@ -573,13 +573,12 @@ void wxSpinCtrl::DoMoveWindow(int x, int y, int width, int height) // if our parent had prepared a defer window handle for us, use it (unless // we are a top level window) wxWindowMSW *parent = GetParent(); - int originalX = x; #if USE_DEFERRED_SIZING HDWP hdwp = parent && !IsTopLevel() ? (HDWP)parent->m_hDWP : NULL; #else HDWP hdwp = 0; -#endif +#endif // 1) The buddy window wxMoveWindowDeferred(hdwp, this, GetBuddyHwnd(),