From fc805e8f03a557d4db992220664cfe8e64631e22 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Sat, 10 Dec 2022 23:59:55 +0330 Subject: [PATCH] AK: Specialise AK::is() for NNRP This is used by the Jakt runtime. --- AK/TypeCasts.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AK/TypeCasts.h b/AK/TypeCasts.h index 171d898d16..44a167b845 100644 --- a/AK/TypeCasts.h +++ b/AK/TypeCasts.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include @@ -27,6 +28,12 @@ ALWAYS_INLINE bool is(InputType* input) return input && is(*input); } +template +ALWAYS_INLINE bool is(NonnullRefPtr const& input) +{ + return is(*input); +} + template ALWAYS_INLINE CopyConst* verify_cast(InputType* input) {