Explicitly cast size_t to int to suppress MSVC warnings.
Implicit size_t-to-int conversions provoke warnings when building 64 bit version (in which sizeof(size_t) > sizeof(int)) with MSVC, so make them explicit as the size_t values used here will always fit in int range. Closes #14113. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
148d83b59f
commit
9de49b112f
@ -811,7 +811,7 @@ public:
|
|||||||
|
|
||||||
// these are pure virtual in wxGridTableBase
|
// these are pure virtual in wxGridTableBase
|
||||||
//
|
//
|
||||||
virtual int GetNumberRows() { return m_data.size(); }
|
virtual int GetNumberRows() { return static_cast<int>(m_data.size()); }
|
||||||
virtual int GetNumberCols() { return m_numCols; }
|
virtual int GetNumberCols() { return m_numCols; }
|
||||||
virtual wxString GetValue( int row, int col );
|
virtual wxString GetValue( int row, int col );
|
||||||
virtual void SetValue( int row, int col, const wxString& s );
|
virtual void SetValue( int row, int col, const wxString& s );
|
||||||
|
@ -352,7 +352,10 @@ private:
|
|||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
// bring the column count in sync with the number of columns we store
|
// bring the column count in sync with the number of columns we store
|
||||||
void UpdateColumnCount() { SetColumnCount(m_cols.size()); }
|
void UpdateColumnCount()
|
||||||
|
{
|
||||||
|
SetColumnCount(static_cast<int>(m_cols.size()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// all our current columns
|
// all our current columns
|
||||||
|
@ -564,7 +564,7 @@ public:
|
|||||||
// helpers
|
// helpers
|
||||||
size_t GetItemCount() const { return m_choices.GetCount(); }
|
size_t GetItemCount() const { return m_choices.GetCount(); }
|
||||||
const wxString& GetLabel( size_t ind ) const
|
const wxString& GetLabel( size_t ind ) const
|
||||||
{ return m_choices.GetLabel(ind); }
|
{ return m_choices.GetLabel(static_cast<int>(ind)); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Used to detect if choices have been changed
|
// Used to detect if choices have been changed
|
||||||
|
Loading…
Reference in New Issue
Block a user