From a19918eb353f1f266f92891eee07834d7cf09cd7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 11 Feb 2007 03:08:33 +0000 Subject: [PATCH] more const correctness (slightly modified patch 1655991) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/include/wx/gizmos/multicell.h | 22 +++++++++++----------- contrib/src/gizmos/multicell.cpp | 18 +++++++++--------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/contrib/include/wx/gizmos/multicell.h b/contrib/include/wx/gizmos/multicell.h index decffefbe9..6e44285488 100644 --- a/contrib/include/wx/gizmos/multicell.h +++ b/contrib/include/wx/gizmos/multicell.h @@ -60,14 +60,14 @@ public: wxMultiCellItemHandle( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT); wxMultiCellItemHandle( int row, int column, wxSize size, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT); wxMultiCellItemHandle( int row, int column, wxResizable style, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT); - int GetColumn(); - int GetRow(); - int GetWidth(); - int GetHeight(); - wxResizable GetStyle(); - wxSize GetLocalSize(); - int GetAlignment(); - wxSize GetWeight(); + int GetColumn() const; + int GetRow() const; + int GetWidth() const; + int GetHeight() const; + wxResizable GetStyle() const; + wxSize GetLocalSize() const; + int GetAlignment() const; + wxSize GetWeight() const; private: void Initialize( int row, int column, int height = 1, int width = 1, wxSize size = wxDefaultSize, wxResizable style = wxNOT_RESIZABLE, wxSize weight = wxSize(1,1), int align = wxALIGN_NOT); @@ -101,7 +101,7 @@ public: private: void GetMinimums(); - int Sum(int *array, int x); + static int Sum(int *array, int x); private: int *m_maxHeight; @@ -135,11 +135,11 @@ public: void Add(wxWindow *win, unsigned int row, unsigned int col); void Resize(int numRows, int numCols); - int MaxRows() + int MaxRows() const { return m_maxRows; }; - int MaxCols() + int MaxCols() const { return m_maxCols; }; diff --git a/contrib/src/gizmos/multicell.cpp b/contrib/src/gizmos/multicell.cpp index b9351e00de..555bc6f659 100644 --- a/contrib/src/gizmos/multicell.cpp +++ b/contrib/src/gizmos/multicell.cpp @@ -83,42 +83,42 @@ wxMultiCellItemHandle :: wxMultiCellItemHandle( int row, int column, wxResizable Initialize(row, column, 1, 1, wxSize(1, 1), style, weight, align); } //--------------------------------------------------------------------------- -int wxMultiCellItemHandle::GetColumn() +int wxMultiCellItemHandle::GetColumn() const { return m_column; } //--------------------------------------------------------------------------- -int wxMultiCellItemHandle::GetRow() +int wxMultiCellItemHandle::GetRow() const { return m_row; } //--------------------------------------------------------------------------- -int wxMultiCellItemHandle::GetWidth() +int wxMultiCellItemHandle::GetWidth() const { return m_width; } //--------------------------------------------------------------------------- -int wxMultiCellItemHandle::GetHeight() +int wxMultiCellItemHandle::GetHeight() const { return m_height; } //--------------------------------------------------------------------------- -wxResizable wxMultiCellItemHandle :: GetStyle() +wxResizable wxMultiCellItemHandle :: GetStyle() const { return m_style; }; //--------------------------------------------------------------------------- -wxSize wxMultiCellItemHandle :: GetLocalSize() +wxSize wxMultiCellItemHandle :: GetLocalSize() const { return m_fixedSize; }; //--------------------------------------------------------------------------- -int wxMultiCellItemHandle :: GetAlignment() +int wxMultiCellItemHandle :: GetAlignment() const { return m_alignment; }; //--------------------------------------------------------------------------- -wxSize wxMultiCellItemHandle :: GetWeight() +wxSize wxMultiCellItemHandle :: GetWeight() const { return m_weight; }; @@ -510,7 +510,7 @@ void wxMultiCellSizer :: GetMinimums() * */ -int wxMultiCellSizer :: Sum(int *array, int x) +/* static */ int wxMultiCellSizer :: Sum(int *array, int x) { int sum = 0; while (x--) -- 2.45.2