From 57246325205cf7fd0fa05cfab9765fb99ded7673 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sat, 2 Sep 2023 01:08:05 -0230 Subject: [PATCH] Fix minor warnings from clang. --- src/gui/RomImageWidget.cxx | 5 ++--- src/gui/RomImageWidget.hxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/RomImageWidget.cxx b/src/gui/RomImageWidget.cxx index 70028f82a..431ad116b 100644 --- a/src/gui/RomImageWidget.cxx +++ b/src/gui/RomImageWidget.cxx @@ -446,9 +446,6 @@ void RomImageWidget::positionSurfaces() const Common::Size maxSize = fs ? instance().frameBuffer().screenSize() : dialog().surface().dstRect().size(); - const Common::Point minPos = fs - ? Common::Point(0, 0) - : s_dst.point(); const Int32 lw = maxSize.w - b * 2; const Int32 lh = maxSize.h - b * 2; // Position at right top @@ -496,12 +493,14 @@ bool RomImageWidget::handleEvent(Event::Type event) void RomImageWidget::handleMouseUp(int x, int y, MouseButton b, int clickCount) { if(isEnabled() && x >= 0 && x < _w && y >= 0 && y < myImageHeight) + { if(myMouseArea == Area::LEFT) changeImage(-1); else if(myMouseArea == Area::RIGHT) changeImage(1); else zoomSurfaces(true); + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/RomImageWidget.hxx b/src/gui/RomImageWidget.hxx index bd2dddb72..7b1c30cb5 100644 --- a/src/gui/RomImageWidget.hxx +++ b/src/gui/RomImageWidget.hxx @@ -42,7 +42,7 @@ class RomImageWidget : public Widget bool changeImage(int direction = 1); // Toggle zoom via keyboard void toggleImageZoom(); - void disableImageZoom() { myZoomMode = false; }; + void disableImageZoom() { myZoomMode = false; } uInt64 pendingLoadTime() { return myMaxLoadTime * timeFactor; }