From f40b6fbd0723e4c758d7e7f2fad048f7d89b3600 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Sat, 7 May 2022 17:20:02 +0200 Subject: [PATCH] PixelPaint: Fix incorrect use of RefCounted CRTP I'm not even sure why this worked. How would the compiler know which type to destruct the FilterInfo object as? Fixes this janky error from gcc 12: AK/RefCounted.h:70:13: error: array subscript 0 is outside array bounds of 'void [56]' [-Werror=array-bounds] 70 | delete static_cast(this); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- Userland/Applications/PixelPaint/FilterModel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/PixelPaint/FilterModel.h b/Userland/Applications/PixelPaint/FilterModel.h index e63363d858..1393b90f75 100644 --- a/Userland/Applications/PixelPaint/FilterModel.h +++ b/Userland/Applications/PixelPaint/FilterModel.h @@ -16,7 +16,7 @@ namespace PixelPaint { class FilterModel final : public GUI::Model { public: - class FilterInfo : public RefCounted { + class FilterInfo : public RefCounted { public: enum class Type { Category,