From 4a7a1f14958b8b6f89332dba6d8ae62d0498dcb9 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Fri, 15 Sep 2023 12:40:19 +0300 Subject: [PATCH] More fixes for iterators-are-pointers case --- modules/ximgproc/src/structured_edge_detection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ximgproc/src/structured_edge_detection.cpp b/modules/ximgproc/src/structured_edge_detection.cpp index ffd80660e..56070bef8 100644 --- a/modules/ximgproc/src/structured_edge_detection.cpp +++ b/modules/ximgproc/src/structured_edge_detection.cpp @@ -148,8 +148,9 @@ static cv::Mat rgb2luv(const cv::Mat &src) lTable[i] = l*maxi; } - for (int i = 0; i < 40; ++i) - lTable.push_back(*--lTable.end()); + for (int i = 0; i < 40; ++i) { + lTable.push_back(*lTable.rbegin()); + } const int nchannels = 3;