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:
@@ -1050,10 +1050,7 @@ public:
|
|||||||
const wxArrayInt& values = wxArrayInt() )
|
const wxArrayInt& values = wxArrayInt() )
|
||||||
{
|
{
|
||||||
Free();
|
Free();
|
||||||
if ( &values )
|
Add(labels,values);
|
||||||
Add(labels,values);
|
|
||||||
else
|
|
||||||
Add(labels);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates exclusive copy of current choices
|
// Creates exclusive copy of current choices
|
||||||
|
Reference in New Issue
Block a user