diff --git a/src/billsdepositsdialog.cpp b/src/billsdepositsdialog.cpp index eb7346bc49..02f008746c 100644 --- a/src/billsdepositsdialog.cpp +++ b/src/billsdepositsdialog.cpp @@ -1350,8 +1350,8 @@ void mmBDDialog::setRepeatType(int repeatType) index.resize(BILLSDEPOSITS_REPEATS.size(), -1); for (size_t i = 0; i < BILLSDEPOSITS_REPEATS.size(); i++) { - int j = BILLSDEPOSITS_REPEATS.at(i).first; - if (j >= 0 && j < BILLSDEPOSITS_REPEATS.size() && index.at(j) == -1) + unsigned int j = BILLSDEPOSITS_REPEATS.at(i).first; + if (j < BILLSDEPOSITS_REPEATS.size() && index.at(j) == -1) index.at(j) = i; else wxFAIL; diff --git a/src/categdialog.cpp b/src/categdialog.cpp index 1b617d224c..9cab6b49ec 100644 --- a/src/categdialog.cpp +++ b/src/categdialog.cpp @@ -763,9 +763,9 @@ void mmCategDialog::OnMenuSelected(wxCommandEvent& event) , wxYES_NO | wxNO_DEFAULT | wxICON_EXCLAMATION); if (msgDlg.ShowModal() == wxID_YES) { - const auto categList = Model_Category::instance().all(); + auto categList = Model_Category::instance().all(); Model_Category::instance().Savepoint(); - for (auto catItem : categList) + for (auto &catItem : categList) { catItem.ACTIVE = 1; Model_Category::instance().save(&catItem); diff --git a/src/mmchecking_list.cpp b/src/mmchecking_list.cpp index c32e569ac8..e07c1225b4 100644 --- a/src/mmchecking_list.cpp +++ b/src/mmchecking_list.cpp @@ -515,12 +515,12 @@ void TransactionListCtrl::OnMouseRightClick(wxMouseEvent& event) menu.Append(MENU_TREEPOPUP_RESTORE_VIEWED, _("Restore &all transactions in current view...")); } bool columnIsAmount = false; - long column = getColumnFromPosition(event.GetX()); + unsigned long column = getColumnFromPosition(event.GetX()); int flags; - long row = HitTest(event.GetPosition(), flags); - if (row >= 0 && flags & wxLIST_HITTEST_ONITEM) + unsigned long row = HitTest(event.GetPosition(), flags); + if (flags & wxLIST_HITTEST_ONITEM) { - if (column >= 0 && column < m_columns.size()) + if (column < m_columns.size()) { wxString menuItemText; wxString refType = Model_Attachment::reftype_desc(Model_Attachment::TRANSACTION); diff --git a/src/mmcheckingpanel.cpp b/src/mmcheckingpanel.cpp index 2aeeebfc12..21c1203945 100644 --- a/src/mmcheckingpanel.cpp +++ b/src/mmcheckingpanel.cpp @@ -410,7 +410,7 @@ void mmCheckingPanel::CreateControls() std::vector sortedRealColumns = {}; for (const auto& i : sortedColumnList) { - for (int j = 0; j < m_listCtrlAccount->m_columns.size(); j++) + for (unsigned int j = 0; j < m_listCtrlAccount->m_columns.size(); j++) { auto k = m_listCtrlAccount->m_columns[j]; auto l = m_listCtrlAccount->m_real_columns[j]; diff --git a/src/mmcustomdata.cpp b/src/mmcustomdata.cpp index aafeb4a6a0..a3efc9ebef 100644 --- a/src/mmcustomdata.cpp +++ b/src/mmcustomdata.cpp @@ -753,7 +753,7 @@ void mmCustomData::SetStringValue(int fieldId, const wxString& value, bool hasCh SetWidgetChanged(widget_id, value); } -bool mmCustomData::ValidateCustomValues(int ref_id) +bool mmCustomData::ValidateCustomValues(int) { bool is_valid = true; for (const auto &field : m_fields) diff --git a/src/mmcustomdata.h b/src/mmcustomdata.h index 245dc61a37..8d78406130 100644 --- a/src/mmcustomdata.h +++ b/src/mmcustomdata.h @@ -37,7 +37,7 @@ class mmCustomData : public wxDialog bool SaveCustomValues(int ref_id); void UpdateCustomValues(int ref_id); void SetStringValue(int fieldID, const wxString& value, bool hasChanged = false); - bool ValidateCustomValues(int ref_id); + bool ValidateCustomValues(int); const wxString GetWidgetData(wxWindowID controlID) const; void SetWidgetData(wxWindowID controlID, const wxString& value); int GetWidgetType(wxWindowID controlID) const; diff --git a/src/mmhomepage.cpp b/src/mmhomepage.cpp index fefeee8181..6d48d5d4be 100644 --- a/src/mmhomepage.cpp +++ b/src/mmhomepage.cpp @@ -273,8 +273,8 @@ void htmlWidgetTop7Categories::getTopCategoryStats( htmlWidgetBillsAndDeposits::htmlWidgetBillsAndDeposits(const wxString& title, mmDateRange* date_range) - : title_(title) - , date_range_(date_range) + : date_range_(date_range) + , title_(title) {} htmlWidgetBillsAndDeposits::~htmlWidgetBillsAndDeposits() @@ -793,7 +793,7 @@ const wxString htmlWidgetCurrency::getHtmlText() std::map usedRates; const auto currencies = Model_Currency::instance().all(); - for (const auto currency : currencies) + for (const auto ¤cy : currencies) { if (Model_Account::is_used(currency)) { diff --git a/src/mmreportspanel.cpp b/src/mmreportspanel.cpp index f800445d76..ed04a59739 100644 --- a/src/mmreportspanel.cpp +++ b/src/mmreportspanel.cpp @@ -51,8 +51,8 @@ mmReportsPanel::mmReportsPanel( wxWindowID winid, const wxPoint& pos, const wxSize& size, long style, const wxString& name) - : rb_(rb) - , m_frame(frame) + : m_frame(frame) + , rb_(rb) , cleanup_(cleanupReport) { Create(parent, winid, pos, size, style, name); diff --git a/src/reports/transactions.cpp b/src/reports/transactions.cpp index edbe7ba1be..38d4d28c77 100644 --- a/src/reports/transactions.cpp +++ b/src/reports/transactions.cpp @@ -32,8 +32,8 @@ mmReportTransactions::mmReportTransactions(wxSharedPtr& transDialog) : mmPrintableBase("Transaction Report") - , m_transDialog(transDialog) , trans_() + , m_transDialog(transDialog) { } @@ -244,6 +244,7 @@ table { case Model_CustomField::TYPE_ID_BOOLEAN: nameCSS.Append(" text-center"); break; + default: break; } hb.addTableHeaderCell(name, nameCSS); } @@ -323,10 +324,12 @@ table { amount = -amount; const double convRate = Model_CurrencyHistory::getDayRate(curr->CURRENCYID, transaction.TRANSDATE); if (showColumnById(mmFilterTransactionsDialog::COL_AMOUNT)) + { if (Model_Checking::status_id(transaction.STATUS) == Model_Checking::STATUS_ID_VOID) hb.addCurrencyCell(Model_Checking::amount(transaction, acc->ACCOUNTID), curr, -1, true); else if (transaction.DELETEDTIME.IsEmpty()) hb.addCurrencyCell(amount, curr); + } total[curr->CURRENCYID] += amount; grand_total[curr->CURRENCYID] += amount; total_in_base_curr[curr->CURRENCYID] += amount * convRate; diff --git a/src/transactionsupdatedialog.cpp b/src/transactionsupdatedialog.cpp index 8cd1d710a6..38c3b0731b 100644 --- a/src/transactionsupdatedialog.cpp +++ b/src/transactionsupdatedialog.cpp @@ -562,7 +562,7 @@ void transactionsUpdateDialog::SetPayeeTransferControls() } } -void transactionsUpdateDialog::OnTransTypeChanged(wxCommandEvent& event) +void transactionsUpdateDialog::OnTransTypeChanged(wxCommandEvent&) { SetPayeeTransferControls(); } diff --git a/src/transactionsupdatedialog.h b/src/transactionsupdatedialog.h index 5b3f3ddfd7..83f323b2be 100644 --- a/src/transactionsupdatedialog.h +++ b/src/transactionsupdatedialog.h @@ -50,7 +50,7 @@ class transactionsUpdateDialog : public wxDialog void OnComboKey(wxKeyEvent& event); void onFocusChange(wxChildFocusEvent& event); void SetPayeeTransferControls(); - void OnTransTypeChanged(wxCommandEvent& event); + void OnTransTypeChanged(wxCommandEvent&); void OnMoreFields(wxCommandEvent& event); private: