summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qeffects.cpp
diff options
context:
space:
mode:
authorIvan Tkachenko <me@ratijas.tk>2022-01-12 21:24:09 +0300
committerIvan Tkachenko <me@ratijas.tk>2022-01-13 01:10:01 +0300
commit2baa7eb260085555433d2e22c0b7606b9ee1a02e (patch)
tree9ce9e3d420444466867bea7c2d4c59fc50967ca0 /src/widgets/widgets/qeffects.cpp
parent6099e96d9eecce785c8540f7cceecb1504ff8396 (diff)
QRollEffect: Remove assignments that have no effect
Value of the member variable `done` will be overwritten after the end of each `if` block. Pointed out by PVS-Studio static analysis tool: https://habr.com/ru/company/pvs-studio/blog/542760 Change-Id: Icaf965aaebfa8a238dd3569689e1496a30d4b6d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/widgets/qeffects.cpp')
-rw-r--r--src/widgets/widgets/qeffects.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/widgets/widgets/qeffects.cpp b/src/widgets/widgets/qeffects.cpp
index 0090f9b0b9..f5acfe27b8 100644
--- a/src/widgets/widgets/qeffects.cpp
+++ b/src/widgets/widgets/qeffects.cpp
@@ -499,14 +499,12 @@ void QRollEffect::scroll()
+ (2 * totalWidth * (elapsed%duration) + duration)
/ (2 * duration);
// equiv. to int((totalWidth*elapsed) / duration + 0.5)
- done = (currentWidth >= totalWidth);
}
if (currentHeight != totalHeight) {
currentHeight = totalHeight * (elapsed/duration)
+ (2 * totalHeight * (elapsed%duration) + duration)
/ (2 * duration);
// equiv. to int((totalHeight*elapsed) / duration + 0.5)
- done = (currentHeight >= totalHeight);
}
done = (currentHeight >= totalHeight) &&
(currentWidth >= totalWidth);