Add some verification to SearchPanel & wxID_ANY in place of -1

This commit is contained in:
2010-07-14 18:56:07 +02:00
parent d248b848b4
commit 5286926588
9 changed files with 96 additions and 60 deletions

View File

@@ -1024,15 +1024,15 @@ std::vector<Operation>* Database::Search(User* user, wxString* description, wxDa
op.checked = set.GetBool(wxT("checked"));
if (dateFrom &&
op.month == dateFrom->GetMonth() &&
op.year == dateFrom->GetYear() &&
op.day < dateFrom->GetDay()-1)
(int)op.month == dateFrom->GetMonth() &&
(int)op.year == dateFrom->GetYear() &&
(int)op.day < dateFrom->GetDay()-1)
continue;
if (dateTo &&
op.month == dateTo->GetMonth() &&
op.year == dateTo->GetYear() &&
op.day > dateTo->GetDay()-1)
(int)op.month == dateTo->GetMonth() &&
(int)op.year == dateTo->GetYear() &&
(int)op.day > dateTo->GetDay()-1)
continue;
res->push_back(op);