From 4f0829e13522f681acc995b53621380650d95780 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 24 Aug 2014 13:35:39 +0000 Subject: [PATCH] Avoid unnecessary assignment in wxOSX build. Don't assign to the variable only to overwrite it with a new value. Closes #16436. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77462 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/datavcmn.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 57fda4bcf7..569444c7ad 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -1460,15 +1460,12 @@ wxDataViewSpinRenderer::wxDataViewSpinRenderer( int min, int max, wxDataViewCell wxWindow* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) { long l = value; -#ifdef __WXMAC__ - wxSize size = wxSize( wxMax(70,labelRect.width ), -1 ); -#endif wxString str; str.Printf( wxT("%d"), (int) l ); wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str, labelRect.GetTopLeft(), labelRect.GetSize(), wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l ); #ifdef __WXMAC__ - size = sc->GetSize(); + const wxSize size = sc->GetSize(); wxPoint pt = sc->GetPosition(); sc->SetSize( pt.x - 4, pt.y - 4, size.x, size.y ); #endif