Optimize wxPGChoices::Set method.

There is no need to check if referenced array with values is 
valid since "reference cannot be bound to dereferenced null pointer in well-defined C++ code".
Moreover, conditional call of Add() methods(one with explicit parameter and one with default one) is not necessary.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Artur Wieczorek 2015-01-03 15:10:02 +00:00
parent febb9c2ee2
commit d04c8569ca

View File

@ -1050,10 +1050,7 @@ public:
const wxArrayInt& values = wxArrayInt() )
{
Free();
if ( &values )
Add(labels,values);
else
Add(labels);
Add(labels,values);
}
// Creates exclusive copy of current choices