1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

Kernel: Switch to using AK::is and AK::downcast

This commit is contained in:
Andreas Kling 2020-07-26 17:15:51 +02:00
parent ce2c5b375c
commit fe6474e692
5 changed files with 14 additions and 31 deletions

View file

@ -26,8 +26,8 @@
#pragma once
#include <Kernel/VM/VMObject.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/VM/VMObject.h>
namespace Kernel {
@ -56,10 +56,8 @@ private:
virtual bool is_anonymous() const override { return true; }
};
template<>
inline bool is<AnonymousVMObject>(const VMObject& vmobject)
{
return vmobject.is_anonymous();
}
}
AK_BEGIN_TYPE_TRAITS(Kernel::AnonymousVMObject)
static bool is_type(const Kernel::VMObject& vmobject) { return vmobject.is_anonymous(); }
AK_END_TYPE_TRAITS()