all repos — mgba @ a46901b90980c82d4ccc63c8daf2746ec64dd670

mGBA Game Boy Advance Emulator

Qt: Fix a handful of warnings
Vicki Pfau vi@endrift.com
Fri, 14 Aug 2020 18:32:19 -0700
commit

a46901b90980c82d4ccc63c8daf2746ec64dd670

parent

4a28264d0cf2608a401f352687e63b238c47bc9f

M src/platform/qt/FrameView.cppsrc/platform/qt/FrameView.cpp

@@ -142,7 +142,7 @@ m_disabled.insert(layer->id);

} #ifdef M_CORE_GBA -void FrameView::updateTilesGBA(bool force) { +void FrameView::updateTilesGBA(bool) { if (m_ui.freeze->checkState() == Qt::Checked) { return; }

@@ -285,7 +285,7 @@ }

#endif #ifdef M_CORE_GB -void FrameView::updateTilesGB(bool force) { +void FrameView::updateTilesGB(bool) { if (m_ui.freeze->checkState() == Qt::Checked) { return; }

@@ -314,10 +314,12 @@ switch (m_controller->platform()) {

#ifdef M_CORE_GBA case PLATFORM_GBA: injectGBA(); + break; #endif #ifdef M_CORE_GB case PLATFORM_GB: injectGB(); + break; #endif } m_vl->runFrame(m_vl);

@@ -376,6 +378,8 @@ pos = static_cast<QMouseEvent*>(event)->localPos();

pos /= m_ui.magnification->value(); disableLayer(pos); return true; + default: + break; } return false; }

@@ -462,4 +466,4 @@ if (index < 0) {

return typeStr; } return tr("%1 %2").arg(typeStr).arg(index); -}+}
M src/platform/qt/MapView.cppsrc/platform/qt/MapView.cpp

@@ -159,7 +159,7 @@ selectTile(x, y);

return true; } -void MapView::updateTilesGBA(bool force) { +void MapView::updateTilesGBA(bool) { { CoreController::Interrupter interrupter(m_controller); int bitmap = -1;
M src/platform/qt/Swatch.cppsrc/platform/qt/Swatch.cpp

@@ -50,7 +50,7 @@ (color >> 16) & 0xFF);

updateFill(index); } -void Swatch::paintEvent(QPaintEvent* event) { +void Swatch::paintEvent(QPaintEvent*) { QPainter painter(this); painter.drawPixmap(QPoint(), m_backing); }
M src/platform/qt/TilePainter.cppsrc/platform/qt/TilePainter.cpp

@@ -19,12 +19,12 @@ resize(256, 768);

setTileCount(3072); } -void TilePainter::paintEvent(QPaintEvent* event) { +void TilePainter::paintEvent(QPaintEvent*) { QPainter painter(this); painter.drawPixmap(QPoint(), m_backing); } -void TilePainter::resizeEvent(QResizeEvent* event) { +void TilePainter::resizeEvent(QResizeEvent*) { int w = width() / m_size; if (!w) { w = 1;