From 8a5d5a5287d59f35bed57cc7d9d977b9979bf18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferenc=20G=C3=A9czi?= Date: Tue, 24 Jun 2025 18:19:03 +0200 Subject: [PATCH] Increase the high-end GCC version in qt-ci (#3488) --- .github/workflows/qt-ci.yml | 8 ++++---- include/mbgl/util/image.hpp | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/qt-ci.yml b/.github/workflows/qt-ci.yml index ed1788626..cded63c78 100644 --- a/.github/workflows/qt-ci.yml +++ b/.github/workflows/qt-ci.yml @@ -59,18 +59,18 @@ jobs: strategy: matrix: include: - - name: Linux + - name: Linux_GCC11 os: ubuntu-24.04 build_type: RelWithDebInfo qt_version: 6.8.1 qt_target: desktop compiler: "" - - name: Linux_GCC13 + - name: Linux_GCC14 os: ubuntu-24.04 build_type: RelWithDebInfo qt_version: 6.8.1 qt_target: desktop - compiler: "gcc-13" + compiler: "gcc-14" - name: macOS os: macos-14 build_type: RelWithDebInfo @@ -128,7 +128,7 @@ jobs: libegl1 \ fonts-noto-cjk - - name: Install compiler + - name: Install compiler (Linux) id: install_compiler if: runner.os == 'Linux' && matrix.compiler != '' uses: rlalik/setup-cpp-compiler@master diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp index dc8254749..fad8b7ee0 100644 --- a/include/mbgl/util/image.hpp +++ b/include/mbgl/util/image.hpp @@ -88,11 +88,15 @@ public: return; } Image newImage(size_); - if (valid()) { + if (!size_.isEmpty() && valid()) { assert(bytes()); // gcc12 bug newImage.fill(0); + copy(*this, + newImage, + {0, 0}, + {0, 0}, + {std::min(size.width, size_.width), std::min(size.height, size_.height)}); } - copy(*this, newImage, {0, 0}, {0, 0}, {std::min(size.width, size_.width), std::min(size.height, size_.height)}); operator=(std::move(newImage)); }