From 68f22507686dfd4734ab027db9d09bd0a06dcefa Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 11 Jul 2021 17:57:52 +0200 Subject: [PATCH] Kernel: Make VMObject::class_name() return a StringView --- Kernel/VM/AnonymousVMObject.h | 2 +- Kernel/VM/ContiguousVMObject.h | 2 +- Kernel/VM/PrivateInodeVMObject.h | 2 +- Kernel/VM/SharedInodeVMObject.h | 2 +- Kernel/VM/VMObject.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Kernel/VM/AnonymousVMObject.h b/Kernel/VM/AnonymousVMObject.h index e36ba2a6a7..5b072f45ea 100644 --- a/Kernel/VM/AnonymousVMObject.h +++ b/Kernel/VM/AnonymousVMObject.h @@ -122,7 +122,7 @@ private: explicit AnonymousVMObject(NonnullRefPtrVector); explicit AnonymousVMObject(const AnonymousVMObject&); - virtual const char* class_name() const override { return "AnonymousVMObject"; } + virtual StringView class_name() const override { return "AnonymousVMObject"sv; } int purge_impl(); void update_volatile_cache(); diff --git a/Kernel/VM/ContiguousVMObject.h b/Kernel/VM/ContiguousVMObject.h index b97d4f2f0a..6cc9983c7d 100644 --- a/Kernel/VM/ContiguousVMObject.h +++ b/Kernel/VM/ContiguousVMObject.h @@ -21,7 +21,7 @@ private: explicit ContiguousVMObject(size_t, NonnullRefPtrVector&); explicit ContiguousVMObject(const ContiguousVMObject&); - virtual const char* class_name() const override { return "ContiguousVMObject"; } + virtual StringView class_name() const override { return "ContiguousVMObject"sv; } virtual RefPtr clone() override; ContiguousVMObject& operator=(const ContiguousVMObject&) = delete; diff --git a/Kernel/VM/PrivateInodeVMObject.h b/Kernel/VM/PrivateInodeVMObject.h index 25d3a2c290..a3437c1282 100644 --- a/Kernel/VM/PrivateInodeVMObject.h +++ b/Kernel/VM/PrivateInodeVMObject.h @@ -27,7 +27,7 @@ private: explicit PrivateInodeVMObject(Inode&, size_t); explicit PrivateInodeVMObject(const PrivateInodeVMObject&); - virtual const char* class_name() const override { return "PrivateInodeVMObject"; } + virtual StringView class_name() const override { return "PrivateInodeVMObject"sv; } PrivateInodeVMObject& operator=(const PrivateInodeVMObject&) = delete; }; diff --git a/Kernel/VM/SharedInodeVMObject.h b/Kernel/VM/SharedInodeVMObject.h index 98e2a30082..cde2019555 100644 --- a/Kernel/VM/SharedInodeVMObject.h +++ b/Kernel/VM/SharedInodeVMObject.h @@ -25,7 +25,7 @@ private: explicit SharedInodeVMObject(Inode&, size_t); explicit SharedInodeVMObject(const SharedInodeVMObject&); - virtual const char* class_name() const override { return "SharedInodeVMObject"; } + virtual StringView class_name() const override { return "SharedInodeVMObject"sv; } SharedInodeVMObject& operator=(const SharedInodeVMObject&) = delete; }; diff --git a/Kernel/VM/VMObject.h b/Kernel/VM/VMObject.h index 4cdd64c9c6..e59a715534 100644 --- a/Kernel/VM/VMObject.h +++ b/Kernel/VM/VMObject.h @@ -46,7 +46,7 @@ public: size_t size() const { return m_physical_pages.size() * PAGE_SIZE; } - virtual const char* class_name() const = 0; + virtual StringView class_name() const = 0; ALWAYS_INLINE void ref_region() { m_regions_count++; } ALWAYS_INLINE void unref_region() { m_regions_count--; }