From 39a1702c99faa7263bb217eaab67b716beadbcc5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 20 Feb 2023 15:23:52 +0100 Subject: [PATCH] LibPDF: Make Object::cast() non-const This was only ever used to cast non-const objects to other non-const object types. --- Userland/Libraries/LibPDF/Object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibPDF/Object.h b/Userland/Libraries/LibPDF/Object.h index e64458fa8f..0be2e9bee4 100644 --- a/Userland/Libraries/LibPDF/Object.h +++ b/Userland/Libraries/LibPDF/Object.h @@ -61,7 +61,7 @@ public: #ifdef PDF_DEBUG SourceLocation loc = SourceLocation::current() #endif - ) const + ) requires(!IsSame) { #ifdef PDF_DEBUG @@ -71,7 +71,7 @@ public: } #endif - return NonnullRefPtr(static_cast(*this)); + return NonnullRefPtr(static_cast(*this)); } virtual char const* type_name() const = 0;