Skip to content

Commit

Permalink
More warning cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerhard Stein committed Jul 21, 2024
1 parent 8eadc80 commit 9348620
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/optiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static const char * const s_pagetitle[] = {
wxTRANSLATE("General"), wxTRANSLATE("View"), wxTRANSLATE("Dashboard"), wxTRANSLATE("Attachments"), wxTRANSLATE("Network"), wxTRANSLATE("Other")
};

wxIMPLEMENT_DYNAMIC_CLASS(mmOptionsDialog, wxDialog);
wxIMPLEMENT_DYNAMIC_CLASS(mmOptionsDialog, wxDialog)

wxBEGIN_EVENT_TABLE( mmOptionsDialog, wxDialog )
EVT_BUTTON(wxID_OK, mmOptionsDialog::OnOk)
Expand Down Expand Up @@ -139,7 +139,7 @@ void mmOptionsDialog::CreateControls()
/**********************************************************************************************
Add the panels to the notebook
**********************************************************************************************/
for (int i = 0; i < m_panel_list.size(); i++) {
for (unsigned int i = 0; i < m_panel_list.size(); i++) {
m_listbook->InsertPage(i, m_panel_list.at(i), wxGetTranslation(s_pagetitle[i]), i ? false : true, i);
}

Expand Down
2 changes: 1 addition & 1 deletion src/optionsettingsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void OptionSettingsView::OnNavTreeColorChanged(wxCommandEvent& event)
}
}

void OptionSettingsView::OnThemeManagerSelected(wxCommandEvent& event)
void OptionSettingsView::OnThemeManagerSelected(wxCommandEvent&)
{
mmThemesDialog dlg(this);
dlg.ShowModal();
Expand Down
2 changes: 1 addition & 1 deletion src/optionsettingsview.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class OptionSettingsView : public OptionSettingsBase
private:
void Create();
void OnHTMLScaleSpin(wxSpinEvent& event);
void OnThemeManagerSelected(wxCommandEvent& event);
void OnThemeManagerSelected(wxCommandEvent&);
void OnNavTreeColorChanged(wxCommandEvent& event);

private:
Expand Down
14 changes: 7 additions & 7 deletions src/themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool mmThemesDialog::vfsThemeImageLoaded = false;
mmThemesDialog::ThemeEntry mmThemesDialog::getThemeEntry(const wxString& name)
{
ThemeEntry thisTheme;
for (const auto theme : m_themes)
for (const auto &theme : m_themes)
{
if (theme.name == name)
{
Expand Down Expand Up @@ -209,7 +209,7 @@ void mmThemesDialog::ReadThemes()
addThemes(mmex::getPathUser(mmex::USERTHEMEDIR), false);

m_themesListBox_->Clear();
for (const auto theme : m_themes)
for (const auto &theme : m_themes)
m_themesListBox_->Append(theme.name);
m_themesListBox_->SetStringSelection(Model_Setting::instance().Theme());
m_themesListBox_->Refresh();
Expand Down Expand Up @@ -275,12 +275,12 @@ void mmThemesDialog::RefreshView()
m_useButton->Enable(!thisTheme.isChosen);
}

void mmThemesDialog::OnThemeView(wxCommandEvent& event)
void mmThemesDialog::OnThemeView(wxCommandEvent&)
{
RefreshView();
}

void mmThemesDialog::OnImport(wxCommandEvent& event)
void mmThemesDialog::OnImport(wxCommandEvent&)
{
wxString fileName = wxFileSelector(_("Choose theme file to import")
, wxEmptyString, wxEmptyString, wxEmptyString
Expand Down Expand Up @@ -321,7 +321,7 @@ void mmThemesDialog::OnImport(wxCommandEvent& event)

}

void mmThemesDialog::OnDelete(wxCommandEvent& event)
void mmThemesDialog::OnDelete(wxCommandEvent&)
{
ThemeEntry thisTheme = getThemeEntry(m_themesListBox_->GetString(m_themesListBox_->GetSelection()));
wxString deletingThemeText = _("Are you sure you want to delete this theme? If you want to use it again you will need to re-import it.");
Expand All @@ -340,7 +340,7 @@ void mmThemesDialog::OnDelete(wxCommandEvent& event)

}

void mmThemesDialog::OnUse(wxCommandEvent& event)
void mmThemesDialog::OnUse(wxCommandEvent&)
{
ThemeEntry thisTheme = getThemeEntry(m_themesListBox_->GetString(m_themesListBox_->GetSelection()));
wxString changingThemeText = _("Are you sure you want to use this theme? Please note that this will only take effect when MMEX is re-started.");
Expand All @@ -355,7 +355,7 @@ void mmThemesDialog::OnUse(wxCommandEvent& event)
RefreshView();
}

void mmThemesDialog::OnOk(wxCommandEvent& event)
void mmThemesDialog::OnOk(wxCommandEvent&)
{
EndModal(wxID_OK);
}
Expand Down
10 changes: 5 additions & 5 deletions src/themes.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class mmThemesDialog : public wxDialog
wxButton* m_okButton = nullptr;

private:
mmThemesDialog() {};
mmThemesDialog() {}

void Create(wxWindow* parent, const wxString &name);
void CreateControls();
Expand All @@ -64,12 +64,12 @@ class mmThemesDialog : public wxDialog
void addThemes(const wxString& themeDir, bool isSystem);
ThemeEntry getThemeEntry(const wxString& name);

void OnOk(wxCommandEvent& event);
void OnImport(wxCommandEvent& event);
void OnOk(wxCommandEvent&);
void OnImport(wxCommandEvent&);
void OnDelete(wxCommandEvent& event);
void OnUse(wxCommandEvent& event);
void OnUse(wxCommandEvent&);
void OnHtmlLink(wxHtmlLinkEvent& event);
void OnThemeView(wxCommandEvent& event);
void OnThemeView(wxCommandEvent&);

enum
{
Expand Down
2 changes: 1 addition & 1 deletion src/transdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ void mmTransDialog::OnOk(wxCommandEvent& WXUNUSED(event))
// Save split tags
const wxString& splitRefType = Model_Attachment::reftype_desc(Model_Attachment::TRANSACTIONSPLIT);

for (int i = 0; i < m_local_splits.size(); i++)
for (unsigned int i = 0; i < m_local_splits.size(); i++)
{
Model_Taglink::Data_Set splitTaglinks;
for (const auto& tagId : m_local_splits.at(i).TAGS)
Expand Down

0 comments on commit 9348620

Please sign in to comment.