From 3981e285b9bda62d3126ad9704f58bf232ba67e0 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 19 Sep 2019 22:06:41 +0200 Subject: [PATCH] dehaze: fix broken build on gcc < 9.x, #5456 --- rtengine/ipdehaze.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rtengine/ipdehaze.cc b/rtengine/ipdehaze.cc index 68af84970..cf333a5d5 100644 --- a/rtengine/ipdehaze.cc +++ b/rtengine/ipdehaze.cc @@ -162,7 +162,8 @@ float estimate_ambient_light(const array2D &R, const array2D &G, c #ifdef _OPENMP #pragma omp parallel for schedule(dynamic) reduction(+:rr,gg,bb,n) #endif - for (const auto &p : patches) { + for (size_t i = 0; i < patches.size(); ++i) { + const auto &p = patches[i]; const int pW = min(p.first + patchsize, W); const int pH = min(p.second + patchsize, H);