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:
Robert Roebling
2009-01-08 14:36:18 +00:00
parent 51d4875177
commit 674f0f2783
2 changed files with 8 additions and 8 deletions

View File

@@ -247,10 +247,10 @@ public:
}
// accessors
int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return int(DoGetValue() + 0.5); }
int GetMin() const { return int(m_min + 0.5); }
int GetMax() const { return int(m_max + 0.5); }
int GetIncrement() const { return int(m_increment + 0.5); }
int GetValue(wxSPINCTRL_GETVALUE_FIX) const { return wxRound( DoGetValue() ); }
int GetMin() const { return wxRound( m_min ); }
int GetMax() const { return wxRound( m_max ); }
int GetIncrement() const { return wxRound( m_increment ); }
// operations
void SetValue(const wxString& value) { wxSpinCtrlGenericBase::SetValue(value); } // visibility problem w/ gcc

View File

@@ -121,10 +121,10 @@ public:
}
// accessors
int GetValue() const { return int(DoGetValue() + 0.5); }
int GetMin() const { return int(DoGetMin() + 0.5); }
int GetMax() const { return int(DoGetMax() + 0.5); }
int GetIncrement() const { return int(DoGetIncrement() + 0.5); }
int GetValue() const { return wxRound( DoGetValue() ); }
int GetMin() const { return wxRound( DoGetMin() ); }
int GetMax() const { return wxRound( DoGetMax() ); }
int GetIncrement() const { return wxRound( DoGetIncrement() ); }
// operations
void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc