diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-09-25 19:26:08 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-09-25 19:26:08 +0200 |
commit | 4f800a941c1eabbcfb3306dc3f869e3acc0dcabb (patch) | |
tree | a1e475eebb6a632a59fb649074d6d3a28875cb92 | |
parent | 51dcacbf7950f409ed615f539777847fa8ca315a (diff) |
library/dlgcoverartfullsize: Use const auto
-rw-r--r-- | src/library/dlgcoverartfullsize.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/library/dlgcoverartfullsize.cpp b/src/library/dlgcoverartfullsize.cpp index 79e7d49df0..02f8ca3212 100644 --- a/src/library/dlgcoverartfullsize.cpp +++ b/src/library/dlgcoverartfullsize.cpp @@ -261,12 +261,10 @@ void DlgCoverArtFullSize::wheelEvent(QWheelEvent* event) { QPoint oldPointUnderCursor = event->pos(); #endif - int newPointX = - static_cast<int>(static_cast<double>(oldPointUnderCursor.x()) / - oldWidth * newSize.width()); - int newPointY = - static_cast<int>(static_cast<double>(oldPointUnderCursor.y()) / - oldHeight * newSize.height()); + const auto newPointX = static_cast<int>( + static_cast<double>(oldPointUnderCursor.x()) / oldWidth * newSize.width()); + const auto newPointY = static_cast<int>( + static_cast<double>(oldPointUnderCursor.y()) / oldHeight * newSize.height()); QPoint newOrigin = QPoint( oldOrigin.x() + (oldPointUnderCursor.x() - newPointX), oldOrigin.y() + (oldPointUnderCursor.y() - newPointY)); |