From ecb2541a930220826d11c476887d61f0c0e31edd Mon Sep 17 00:00:00 2001 From: Vitor Kiguchi Date: Fri, 24 Jul 2020 01:35:52 -0300 Subject: [PATCH] Solve some unreferenced parameter warnings (C4100: unreferenced formal parameter) --- src/citra_qt/configuration/configure_motion_touch.cpp | 4 ++-- src/citra_qt/configuration/configure_touch_from_button.cpp | 2 ++ src/citra_qt/debugger/graphics/graphics.cpp | 1 + src/citra_qt/debugger/graphics/graphics_breakpoints.cpp | 2 ++ src/citra_qt/debugger/graphics/graphics_cmdlists.cpp | 3 +++ src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp | 3 +++ src/citra_qt/debugger/profiler.cpp | 1 + src/citra_qt/game_list.cpp | 1 + src/citra_qt/main.cpp | 3 +++ src/citra_qt/util/clickable_label.cpp | 5 ++++- 10 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/citra_qt/configuration/configure_motion_touch.cpp b/src/citra_qt/configuration/configure_motion_touch.cpp index 7573e2217..9ba3ca2e0 100644 --- a/src/citra_qt/configuration/configure_motion_touch.cpp +++ b/src/citra_qt/configuration/configure_motion_touch.cpp @@ -168,10 +168,10 @@ void ConfigureMotionTouch::UpdateUiDisplay() { void ConfigureMotionTouch::ConnectEvents() { connect(ui->motion_provider, static_cast(&QComboBox::currentIndexChanged), this, - [this](int index) { UpdateUiDisplay(); }); + [this](int index) { Q_UNUSED(index); UpdateUiDisplay(); }); connect(ui->touch_provider, static_cast(&QComboBox::currentIndexChanged), this, - [this](int index) { UpdateUiDisplay(); }); + [this](int index) { Q_UNUSED(index); UpdateUiDisplay(); }); connect(ui->udp_test, &QPushButton::clicked, this, &ConfigureMotionTouch::OnCemuhookUDPTest); connect(ui->touch_calibration_config, &QPushButton::clicked, this, &ConfigureMotionTouch::OnConfigureTouchCalibration); diff --git a/src/citra_qt/configuration/configure_touch_from_button.cpp b/src/citra_qt/configuration/configure_touch_from_button.cpp index 12473e3f6..db222fa75 100644 --- a/src/citra_qt/configuration/configure_touch_from_button.cpp +++ b/src/citra_qt/configuration/configure_touch_from_button.cpp @@ -327,6 +327,7 @@ void ConfigureTouchFromButton::OnBindingChanged(QStandardItem* item) { } void ConfigureTouchFromButton::OnBindingDeleted(const QModelIndex& parent, int first, int last) { + Q_UNUSED(parent); for (int i = first; i <= last; ++i) { auto ix = binding_list_model->index(i, 0); if (!ix.isValid()) { @@ -514,6 +515,7 @@ void TouchScreenPreview::mouseMoveEvent(QMouseEvent* event) { } void TouchScreenPreview::leaveEvent(QEvent* event) { + Q_UNUSED(event); if (coord_label) { coord_label->clear(); } diff --git a/src/citra_qt/debugger/graphics/graphics.cpp b/src/citra_qt/debugger/graphics/graphics.cpp index 65d10f78b..6d0914fec 100644 --- a/src/citra_qt/debugger/graphics/graphics.cpp +++ b/src/citra_qt/debugger/graphics/graphics.cpp @@ -15,6 +15,7 @@ GPUCommandStreamItemModel::GPUCommandStreamItemModel(QObject* parent) } int GPUCommandStreamItemModel::rowCount(const QModelIndex& parent) const { + Q_UNUSED(parent); return command_count; } diff --git a/src/citra_qt/debugger/graphics/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics/graphics_breakpoints.cpp index 477762cff..ffd1bfbfc 100644 --- a/src/citra_qt/debugger/graphics/graphics_breakpoints.cpp +++ b/src/citra_qt/debugger/graphics/graphics_breakpoints.cpp @@ -17,10 +17,12 @@ BreakPointModel::BreakPointModel(std::shared_ptr debug_conte active_breakpoint(debug_context->active_breakpoint) {} int BreakPointModel::columnCount(const QModelIndex& parent) const { + Q_UNUSED(parent); return 1; } int BreakPointModel::rowCount(const QModelIndex& parent) const { + Q_UNUSED(parent); return static_cast(Pica::DebugContext::Event::NumEvents); } diff --git a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp index 9b94b17d6..1396b3b0d 100644 --- a/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp +++ b/src/citra_qt/debugger/graphics/graphics_cmdlists.cpp @@ -58,10 +58,12 @@ public: GPUCommandListModel::GPUCommandListModel(QObject* parent) : QAbstractListModel(parent) {} int GPUCommandListModel::rowCount(const QModelIndex& parent) const { + Q_UNUSED(parent); return static_cast(pica_trace.writes.size()); } int GPUCommandListModel::columnCount(const QModelIndex& parent) const { + Q_UNUSED(parent); return 4; } @@ -90,6 +92,7 @@ QVariant GPUCommandListModel::data(const QModelIndex& index, int role) const { } QVariant GPUCommandListModel::headerData(int section, Qt::Orientation orientation, int role) const { + Q_UNUSED(orientation); switch (role) { case Qt::DisplayRole: { switch (section) { diff --git a/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp b/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp index 91695f43a..6241dacc2 100644 --- a/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp +++ b/src/citra_qt/debugger/graphics/graphics_vertex_shader.cpp @@ -30,15 +30,18 @@ GraphicsVertexShaderModel::GraphicsVertexShaderModel(GraphicsVertexShaderWidget* : QAbstractTableModel(parent), par(parent) {} int GraphicsVertexShaderModel::columnCount(const QModelIndex& parent) const { + Q_UNUSED(parent); return 3; } int GraphicsVertexShaderModel::rowCount(const QModelIndex& parent) const { + Q_UNUSED(parent); return static_cast(par->info.code.size()); } QVariant GraphicsVertexShaderModel::headerData(int section, Qt::Orientation orientation, int role) const { + Q_UNUSED(orientation); switch (role) { case Qt::DisplayRole: { if (section == 0) { diff --git a/src/citra_qt/debugger/profiler.cpp b/src/citra_qt/debugger/profiler.cpp index e005d01a2..712242466 100644 --- a/src/citra_qt/debugger/profiler.cpp +++ b/src/citra_qt/debugger/profiler.cpp @@ -113,6 +113,7 @@ MicroProfileWidget::MicroProfileWidget(QWidget* parent) : QWidget(parent) { } void MicroProfileWidget::paintEvent(QPaintEvent* ev) { + Q_UNUSED(ev); QPainter painter(this); // The units used by Microprofile for drawing are based in pixels on a 96 dpi display. diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index 582e3d00d..cc0264c5e 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp @@ -755,5 +755,6 @@ void GameListPlaceholder::onUpdateThemedIcons() { } void GameListPlaceholder::mouseDoubleClickEvent(QMouseEvent* event) { + Q_UNUSED(event); emit GameListPlaceholder::AddDirectory(); } diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 1c1374349..9a6825422 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -2097,14 +2097,17 @@ void GMainWindow::OnMouseActivity() { } void GMainWindow::mouseMoveEvent(QMouseEvent* event) { + Q_UNUSED(event); OnMouseActivity(); } void GMainWindow::mousePressEvent(QMouseEvent* event) { + Q_UNUSED(event); OnMouseActivity(); } void GMainWindow::mouseReleaseEvent(QMouseEvent* event) { + Q_UNUSED(event); OnMouseActivity(); } diff --git a/src/citra_qt/util/clickable_label.cpp b/src/citra_qt/util/clickable_label.cpp index e990423a9..22b517c11 100644 --- a/src/citra_qt/util/clickable_label.cpp +++ b/src/citra_qt/util/clickable_label.cpp @@ -4,8 +4,11 @@ #include "citra_qt/util/clickable_label.h" -ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f) : QLabel(parent) {} +ClickableLabel::ClickableLabel(QWidget* parent, Qt::WindowFlags f) : QLabel(parent) { + Q_UNUSED(f); +} void ClickableLabel::mouseReleaseEvent(QMouseEvent* event) { + Q_UNUSED(event); emit clicked(); }