Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kakoune for openSUSE:Factory checked in at 2022-06-28 15:23:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kakoune (Old) and /work/SRC/openSUSE:Factory/.kakoune.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kakoune" Tue Jun 28 15:23:08 2022 rev:22 rq:985586 version:2021.11.08 Changes: -------- --- /work/SRC/openSUSE:Factory/kakoune/kakoune.changes 2021-12-05 22:46:13.957618395 +0100 +++ /work/SRC/openSUSE:Factory/.kakoune.new.1548/kakoune.changes 2022-06-28 15:23:27.794040095 +0200 @@ -1,0 +2,5 @@ +Mon Jun 27 20:43:08 UTC 2022 - Antoine Belvire <[email protected]> + +- Add kakoune-2021.11.08-gcc-12.patch: Fix build with gcc 12. + +------------------------------------------------------------------- New: ---- kakoune-2021.11.08-gcc-12.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kakoune.spec ++++++ --- /var/tmp/diff_new_pack.Gq0dL9/_old 2022-06-28 15:23:28.210040717 +0200 +++ /var/tmp/diff_new_pack.Gq0dL9/_new 2022-06-28 15:23:28.214040722 +0200 @@ -24,6 +24,8 @@ Group: Productivity/Text/Editors URL: https://kakoune.org/ Source: https://github.com/mawww/kakoune/releases/download/v%{version}/kakoune-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM kakoune-2021.11.08-gcc-12.patch -- Fix build with gcc 12 (gh#mawww/kakoune#4544) +Patch: kakoune-2021.11.08-gcc-12.patch BuildRequires: asciidoc BuildRequires: fdupes BuildRequires: gcc-c++ >= 5.0 ++++++ kakoune-2021.11.08-gcc-12.patch ++++++ >From d1ea2ffa600fd2a7b14e415b68ceedba3325c5db Mon Sep 17 00:00:00 2001 From: Tim Allen <[email protected]> Date: Sat, 12 Feb 2022 21:35:33 +1100 Subject: [PATCH] Make Color::validate_alpha() a constexpr function. We call it from a constexpr constructor, so it needs to be constexpr itself. Fixes #4544. --- src/color.cc | 7 ------- src/color.hh | 7 ++++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/color.cc b/src/color.cc index b355b9cf13..dfe2e955b2 100644 --- a/src/color.cc +++ b/src/color.cc @@ -34,13 +34,6 @@ bool is_color_name(StringView color) return contains(color_names, color); } -void Color::validate_alpha() -{ - static_assert(RGB == 17); - if (a < RGB) - throw runtime_error("Colors alpha must be > 16"); -} - Color str_to_color(StringView color) { auto it = find_if(color_names, [&](const char* c){ return color == c; }); diff --git a/src/color.hh b/src/color.hh index 943678edfb..85babd9800 100644 --- a/src/color.hh +++ b/src/color.hh @@ -1,6 +1,7 @@ #ifndef color_hh_INCLUDED #define color_hh_INCLUDED +#include "exception.hh" #include "hash.hh" #include "meta.hh" #include "assert.hh" @@ -55,7 +56,11 @@ struct Color } private: - void validate_alpha(); + constexpr void validate_alpha() { + static_assert(RGB == 17); + if (a < RGB) + throw runtime_error("Colors alpha must be > 16"); + } }; constexpr bool operator==(Color lhs, Color rhs)
