mirror of
https://github.com/RGBCube/serenity
synced 2025-06-14 03:02:09 +00:00
Kernel: Remove unnecessary String allocation in SystemExposedFolder
This commit is contained in:
parent
66f483b1a1
commit
55c6e08c9e
2 changed files with 5 additions and 5 deletions
|
@ -50,12 +50,12 @@ RefPtr<SystemExposedComponent> SystemExposedFolder::lookup(StringView name)
|
|||
return {};
|
||||
}
|
||||
|
||||
SystemExposedFolder::SystemExposedFolder(String name)
|
||||
SystemExposedFolder::SystemExposedFolder(StringView name)
|
||||
: SystemExposedComponent(name)
|
||||
{
|
||||
}
|
||||
|
||||
SystemExposedFolder::SystemExposedFolder(String name, SystemExposedFolder const& parent_folder)
|
||||
SystemExposedFolder::SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder)
|
||||
: SystemExposedComponent(name)
|
||||
, m_parent_folder(parent_folder)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <AK/Function.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/FileSystem/File.h>
|
||||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
|
@ -53,8 +53,8 @@ public:
|
|||
virtual NonnullRefPtr<Inode> to_inode(SysFS const& sysfs_instance) const override final;
|
||||
|
||||
protected:
|
||||
explicit SystemExposedFolder(String name);
|
||||
SystemExposedFolder(String name, SystemExposedFolder const& parent_folder);
|
||||
explicit SystemExposedFolder(StringView name);
|
||||
SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder);
|
||||
NonnullRefPtrVector<SystemExposedComponent> m_components;
|
||||
RefPtr<SystemExposedFolder> m_parent_folder;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue