use wxRound(x) instead of int( x+0.5 )
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57909 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -247,10 +247,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return int(DoGetValue() + 0.5); }
|
int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return wxRound( DoGetValue() ); }
|
||||||
int GetMin() const { return int(m_min + 0.5); }
|
int GetMin() const { return wxRound( m_min ); }
|
||||||
int GetMax() const { return int(m_max + 0.5); }
|
int GetMax() const { return wxRound( m_max ); }
|
||||||
int GetIncrement() const { return int(m_increment + 0.5); }
|
int GetIncrement() const { return wxRound( m_increment ); }
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
void SetValue(const wxString& value) { wxSpinCtrlGenericBase::SetValue(value); } // visibility problem w/ gcc
|
void SetValue(const wxString& value) { wxSpinCtrlGenericBase::SetValue(value); } // visibility problem w/ gcc
|
||||||
|
@@ -121,10 +121,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
int GetValue() const { return int(DoGetValue() + 0.5); }
|
int GetValue() const { return wxRound( DoGetValue() ); }
|
||||||
int GetMin() const { return int(DoGetMin() + 0.5); }
|
int GetMin() const { return wxRound( DoGetMin() ); }
|
||||||
int GetMax() const { return int(DoGetMax() + 0.5); }
|
int GetMax() const { return wxRound( DoGetMax() ); }
|
||||||
int GetIncrement() const { return int(DoGetIncrement() + 0.5); }
|
int GetIncrement() const { return wxRound( DoGetIncrement() ); }
|
||||||
|
|
||||||
// operations
|
// operations
|
||||||
void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
|
void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
|
||||||
|
Reference in New Issue
Block a user