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<const T*>(this);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Daniel Bertalan 2022-05-07 17:20:02 +02:00 committed by Andreas Kling
parent 699bd9afc6
commit f40b6fbd07
Notes: sideshowbarker 2024-07-17 17:06:59 +09:00

View file

@ -16,7 +16,7 @@ namespace PixelPaint {
class FilterModel final : public GUI::Model {
public:
class FilterInfo : public RefCounted {
class FilterInfo : public RefCounted<FilterInfo> {
public:
enum class Type {
Category,