From 674f0f27835e4136be84f0977898a1488ada4c28 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Thu, 8 Jan 2009 14:36:18 +0000 Subject: [PATCH] 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 --- include/wx/generic/spinctlg.h | 8 ++++---- include/wx/gtk/spinctrl.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index bdd0d4e55e..d01f8ba5bc 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -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 diff --git a/include/wx/gtk/spinctrl.h b/include/wx/gtk/spinctrl.h index da0fd6c8ce..2cc0254253 100644 --- a/include/wx/gtk/spinctrl.h +++ b/include/wx/gtk/spinctrl.h @@ -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 -- 2.45.2