From 9cf662c4920021cb10ef5b3020c96217d5d7e500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 5 Aug 2004 15:01:34 +0000 Subject: [PATCH] GCC fixes: order of initializations, type casting, empty last lines. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/foldbar/foldpanelitem.h | 10 +++++----- .../foldbar/foldpanelbar/foldpanelbartest.rc | 2 +- contrib/src/foldbar/captionbar.cpp | 14 +++++++++++--- contrib/src/foldbar/foldpanelbar.cpp | 4 ++-- contrib/src/foldbar/foldpanelitem.cpp | 2 +- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/contrib/include/wx/foldbar/foldpanelitem.h b/contrib/include/wx/foldbar/foldpanelitem.h index edc5432bd0..509898f30b 100644 --- a/contrib/include/wx/foldbar/foldpanelitem.h +++ b/contrib/include/wx/foldbar/foldpanelitem.h @@ -51,10 +51,10 @@ public: int leftSpacing = wxFPB_DEFAULT_LEFTSPACING, int rightSpacing = wxFPB_DEFAULT_RIGHTSPACING) : _wnd(wnd) , _type(WINDOW) - , _ySpacing(ySpacing) + , _flags(flags) , _leftSpacing(leftSpacing) , _rightSpacing(rightSpacing) - , _flags(flags) + , _ySpacing(ySpacing) , _lineWidth(0) , _lineY(0) { @@ -66,13 +66,13 @@ public: int rightSpacing = wxFPB_DEFAULT_RIGHTLINESPACING) : _wnd(0) , _type(SEPARATOR) - , _ySpacing(ySpacing) + , _flags(wxFPB_ALIGN_WIDTH) , _leftSpacing(leftSpacing) , _rightSpacing(rightSpacing) - , _flags(wxFPB_ALIGN_WIDTH) - , _sepLineColour(lineColor) + , _ySpacing(ySpacing) , _lineWidth(0) , _lineY(y) + , _sepLineColour(lineColor) { }; diff --git a/contrib/samples/foldbar/foldpanelbar/foldpanelbartest.rc b/contrib/samples/foldbar/foldpanelbar/foldpanelbartest.rc index 359a983cdb..8546218dc7 100644 --- a/contrib/samples/foldbar/foldpanelbar/foldpanelbartest.rc +++ b/contrib/samples/foldbar/foldpanelbar/foldpanelbartest.rc @@ -3,4 +3,4 @@ mondrian ICON "sample.ico" #define FOLDPANELBARTEST_QUIT 1 #define FOLDPANELBARTEST_ABOUT 102 -#include "wx/msw/wx.rc" \ No newline at end of file +#include "wx/msw/wx.rc" diff --git a/contrib/src/foldbar/captionbar.cpp b/contrib/src/foldbar/captionbar.cpp index 64341339d3..34a46ff839 100644 --- a/contrib/src/foldbar/captionbar.cpp +++ b/contrib/src/foldbar/captionbar.cpp @@ -44,11 +44,11 @@ wxCaptionBar::wxCaptionBar(wxWindow* parent, const wxString &caption, wxImageLis const wxCaptionBarStyle &cbstyle, const wxPoint& pos, const wxSize& size, long style) : wxWindow(parent, id, pos, size, style) , _caption(caption) - , _collapsed(false) , _foldIcons(images) , _rightIndent(wxFPB_BMP_RIGHTSPACE) , _iconWidth(16) , _iconHeight(16) + , _collapsed(false) { // do initialisy thingy stuff @@ -239,7 +239,11 @@ void wxCaptionBar::DrawVerticalGradient(wxDC &dc, const wxRect &rect ) wxColour currCol; for(int y = rect.y; y < rect.y + rect.height; y++) { - currCol.Set(col1.Red() + rf, col1.Green() + gf, col1.Blue() + bf); + currCol.Set( + (unsigned char)(col1.Red() + rf), + (unsigned char)(col1.Green() + gf), + (unsigned char)(col1.Blue() + bf) + ); dc.SetBrush( wxBrush( currCol, wxSOLID ) ); dc.DrawRectangle( rect.x, rect.y + (y - rect.y), rect.width, rect.height ); //currCol.Set(currCol.Red() + rstep, currCol.Green() + gstep, currCol.Blue() + bstep); @@ -267,7 +271,11 @@ void wxCaptionBar::DrawHorizontalGradient(wxDC &dc, const wxRect &rect ) wxColour currCol; for(int x = rect.x; x < rect.x + rect.width; x++) { - currCol.Set(col1.Red() + rf, col1.Green() + gf, col1.Blue() + bf); + currCol.Set( + (unsigned char)(col1.Red() + rf), + (unsigned char)(col1.Green() + gf), + (unsigned char)(col1.Blue() + bf) + ); dc.SetBrush( wxBrush( currCol, wxSOLID ) ); dc.DrawRectangle( rect.x + (x - rect.x), rect.y, 1, rect.height ); rf += rstep; gf += gstep; bf += bstep; diff --git a/contrib/src/foldbar/foldpanelbar.cpp b/contrib/src/foldbar/foldpanelbar.cpp index e7d6ff5268..b3d9b30e69 100644 --- a/contrib/src/foldbar/foldpanelbar.cpp +++ b/contrib/src/foldbar/foldpanelbar.cpp @@ -235,7 +235,7 @@ void wxFoldPanelBar::RefreshPanelsFrom(wxFoldPanelItem *item) { wxASSERT(item); - size_t i = _panels.Index(item); + int i = _panels.Index(item); if(i != wxNOT_FOUND) RefreshPanelsFrom(i); } @@ -347,4 +347,4 @@ int wxFoldPanelBar::GetPanelsHeight(int &collapsed, int &expanded) return value; -} \ No newline at end of file +} diff --git a/contrib/src/foldbar/foldpanelitem.cpp b/contrib/src/foldbar/foldpanelitem.cpp index 6f6897b936..08d606c188 100644 --- a/contrib/src/foldbar/foldpanelitem.cpp +++ b/contrib/src/foldbar/foldpanelitem.cpp @@ -38,9 +38,9 @@ wxFoldPanelItem::wxFoldPanelItem( wxWindow *parent, const wxString &caption, wxI : _controlCreated(false) , _yUserSize(0) , _yPanelSize(0) + , _yLastInsertPos(0) , _yPos(0) , _userSized(false) - , _yLastInsertPos(0) { wxCHECK2(parent, return);