No real changes, just fix a harmless warning under OS X.

Don't use "size" variable unnecessarily under non-Mac platforms, this also
fixes a warning about reassigning it immediately after assigning a previous
values to it under Mac.

Closes #16353.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-06-29 23:43:08 +00:00
parent 6446625f96
commit ffea8a9a6a

View File

@@ -1460,14 +1460,13 @@ wxDataViewSpinRenderer::wxDataViewSpinRenderer( int min, int max, wxDataViewCell
wxWindow* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) wxWindow* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
{ {
long l = value; long l = value;
wxSize size = labelRect.GetSize();
#ifdef __WXMAC__ #ifdef __WXMAC__
size = wxSize( wxMax(70,labelRect.width ), -1 ); wxSize size = wxSize( wxMax(70,labelRect.width ), -1 );
#endif #endif
wxString str; wxString str;
str.Printf( wxT("%d"), (int) l ); str.Printf( wxT("%d"), (int) l );
wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str, wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str,
labelRect.GetTopLeft(), size, wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l ); labelRect.GetTopLeft(), labelRect.GetSize(), wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l );
#ifdef __WXMAC__ #ifdef __WXMAC__
size = sc->GetSize(); size = sc->GetSize();
wxPoint pt = sc->GetPosition(); wxPoint pt = sc->GetPosition();