From ec9b8de3fae0dc93d45b231e58a30764f6d6f06f Mon Sep 17 00:00:00 2001 From: Alexander Smorkalov <2536374+asmorkalov@users.noreply.github.com> Date: Thu, 24 Jul 2025 11:23:21 +0300 Subject: [PATCH] Merge pull request #27569 from asmorkalov:as/counters_build_fix Fixed build issue with some old GCC versions #27569 Fixes build for GCC 4.8.5 at least. Looks like the method default signature differs cross GCC versions or newer version has softer checker. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake --- modules/imgcodecs/test/test_exif.cpp | 6 +++--- modules/imgproc/src/contours_blockstorage.hpp | 4 ++-- modules/imgproc/src/contours_common.hpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/imgcodecs/test/test_exif.cpp b/modules/imgcodecs/test/test_exif.cpp index 09e70b3046..8576c4f1e4 100644 --- a/modules/imgcodecs/test/test_exif.cpp +++ b/modules/imgcodecs/test/test_exif.cpp @@ -565,13 +565,13 @@ TEST_P(ReadExif_Sanity, Check) static const std::vector exif_sanity_params { #ifdef HAVE_JPEG - {"readwrite/testExifOrientation_3.jpg", 916, "Photoshop", 120}, + ReadExif_Sanity_Params("readwrite/testExifOrientation_3.jpg", 916, "Photoshop", 120), #endif #ifdef OPENCV_IMGCODECS_PNG_WITH_EXIF - {"readwrite/testExifOrientation_5.png", 112, "ExifTool", 102}, + ReadExif_Sanity_Params("readwrite/testExifOrientation_5.png", 112, "ExifTool", 102), #endif #ifdef HAVE_AVIF - {"readwrite/testExifOrientation_7.avif", 913, "Photoshop", 120}, + ReadExif_Sanity_Params("readwrite/testExifOrientation_7.avif", 913, "Photoshop", 120), #endif }; diff --git a/modules/imgproc/src/contours_blockstorage.hpp b/modules/imgproc/src/contours_blockstorage.hpp index 7b7c55a72d..a30cba96d4 100644 --- a/modules/imgproc/src/contours_blockstorage.hpp +++ b/modules/imgproc/src/contours_blockstorage.hpp @@ -26,14 +26,14 @@ class BlockStorage { dynamicBlocks.push_back(new block_type); } BlockStorage(const BlockStorage&) = delete; - BlockStorage(BlockStorage&&) noexcept = default; + BlockStorage(BlockStorage&&) = default; ~BlockStorage() { for(const auto & block : dynamicBlocks) { delete block; } } BlockStorage& operator=(const BlockStorage&) = delete; - BlockStorage& operator=(BlockStorage&&) noexcept = default; + BlockStorage& operator=(BlockStorage&&) = default; void clear(void) { const size_t minDynamicBlocks = !staticBlocksCount ? 1 : 0; diff --git a/modules/imgproc/src/contours_common.hpp b/modules/imgproc/src/contours_common.hpp index e02945fd01..08f3dc1b3d 100644 --- a/modules/imgproc/src/contours_common.hpp +++ b/modules/imgproc/src/contours_common.hpp @@ -190,7 +190,7 @@ public: ContourDataStorage(ContourDataStorage&&) noexcept = default; ~ContourDataStorage() = default; ContourDataStorage& operator=(const ContourDataStorage&) = delete; - ContourDataStorage& operator=(ContourDataStorage&&) noexcept = default; + ContourDataStorage& operator=(ContourDataStorage&&) = default; public: typename storage_t::RangeIterator getRangeIterator(void) const {return storage->getRangeIterator(first, last);} public: @@ -243,7 +243,7 @@ public: Contour(const Contour&) = delete; Contour(Contour&& other) noexcept = default; Contour& operator=(const Contour&) = delete; - Contour& operator=(Contour&& other) noexcept = default; + Contour& operator=(Contour&& other) = default; ~Contour() = default; void updateBoundingRect() {} bool isEmpty() const