From c427f8bbeb7f67a6ce16c6197bb4295824fbeebe Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 1 Jan 2022 22:27:24 +0100 Subject: [PATCH] Kernel: Always pass InodeIdentifier by value These objects are small, there are no benefits to passing by reference. --- Kernel/FileSystem/Inode.cpp | 4 ++-- Kernel/FileSystem/Inode.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp index 7a5e220111..7c6b9acf8f 100644 --- a/Kernel/FileSystem/Inode.cpp +++ b/Kernel/FileSystem/Inode.cpp @@ -202,7 +202,7 @@ void Inode::set_metadata_dirty(bool metadata_dirty) } } -void Inode::did_add_child(InodeIdentifier const&, String const& name) +void Inode::did_add_child(InodeIdentifier, String const& name) { MutexLocker locker(m_inode_lock); @@ -211,7 +211,7 @@ void Inode::did_add_child(InodeIdentifier const&, String const& name) } } -void Inode::did_remove_child(InodeIdentifier const&, String const& name) +void Inode::did_remove_child(InodeIdentifier, String const& name) { MutexLocker locker(m_inode_lock); diff --git a/Kernel/FileSystem/Inode.h b/Kernel/FileSystem/Inode.h index 75ecc8f9e5..6ad3d0dd81 100644 --- a/Kernel/FileSystem/Inode.h +++ b/Kernel/FileSystem/Inode.h @@ -106,8 +106,8 @@ protected: void set_metadata_dirty(bool); ErrorOr prepare_to_write_data(); - void did_add_child(InodeIdentifier const& child_id, String const& name); - void did_remove_child(InodeIdentifier const& child_id, String const& name); + void did_add_child(InodeIdentifier child_id, String const& name); + void did_remove_child(InodeIdentifier child_id, String const& name); void did_modify_contents(); void did_delete_self();