summaryrefslogtreecommitdiff
path: root/splash
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2019-10-02 17:50:42 +0200
committerAlbert Astals Cid <aacid@kde.org>2019-10-02 17:50:42 +0200
commit095735fa1259a030da8c854ee8ff649fe907642d (patch)
treef373663646e2a6f77e57176493d621580adf656a /splash
parentf92b2858aa393c8886c35f0db50cc1a3a9603589 (diff)
Enable clang-tidy bugprone-too-small-loop-variable
And fixes for it in the code
Diffstat (limited to 'splash')
-rw-r--r--splash/SplashXPathScanner.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/splash/SplashXPathScanner.cc b/splash/SplashXPathScanner.cc
index 042a6ef6..4ca90bc2 100644
--- a/splash/SplashXPathScanner.cc
+++ b/splash/SplashXPathScanner.cc
@@ -129,9 +129,9 @@ void SplashXPathScanner::getSpanBounds(int y, int *spanXMin, int *spanXMax) {
if (!line.empty()) {
*spanXMin = line[0].x0;
int xx = line[0].x1;
- for (unsigned int i = 1; i < line.size(); ++i) {
- if (line[i].x1 > xx) {
- xx = line[i].x1;
+ for (const SplashIntersect &intersect : line) {
+ if (intersect.x1 > xx) {
+ xx = intersect.x1;
}
}
*spanXMax = xx;