Some optimizations on empty wxString comparison and on Search (Database)
This commit is contained in:
@@ -146,7 +146,7 @@ void GenerateDialog::OnYearFromChange(wxCommandEvent& event)
|
||||
|
||||
_monthFrom->Clear();
|
||||
|
||||
if (years == wxT(""))
|
||||
if (!years.Length())
|
||||
{
|
||||
_monthFrom->Append(wxT(""));
|
||||
return;
|
||||
@@ -193,7 +193,7 @@ void GenerateDialog::OnOK(wxCommandEvent& event)
|
||||
{
|
||||
int monthFrom, yearFrom, monthTo, yearTo, i;
|
||||
|
||||
if (_yearFrom->GetString(_yearFrom->GetCurrentSelection()) == wxT(""))
|
||||
if (!_yearFrom->GetString(_yearFrom->GetCurrentSelection()).Length())
|
||||
{
|
||||
monthFrom = -1;
|
||||
yearFrom = -1;
|
||||
|
Reference in New Issue
Block a user