mirror of
https://github.com/RGBCube/serenity
synced 2025-06-14 18:32:07 +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 {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemExposedFolder::SystemExposedFolder(String name)
|
SystemExposedFolder::SystemExposedFolder(StringView name)
|
||||||
: SystemExposedComponent(name)
|
: SystemExposedComponent(name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemExposedFolder::SystemExposedFolder(String name, SystemExposedFolder const& parent_folder)
|
SystemExposedFolder::SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder)
|
||||||
: SystemExposedComponent(name)
|
: SystemExposedComponent(name)
|
||||||
, m_parent_folder(parent_folder)
|
, m_parent_folder(parent_folder)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include <AK/Function.h>
|
#include <AK/Function.h>
|
||||||
#include <AK/RefCounted.h>
|
#include <AK/RefCounted.h>
|
||||||
#include <AK/RefPtr.h>
|
#include <AK/RefPtr.h>
|
||||||
#include <AK/String.h>
|
#include <AK/StringView.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <Kernel/FileSystem/File.h>
|
#include <Kernel/FileSystem/File.h>
|
||||||
#include <Kernel/FileSystem/FileSystem.h>
|
#include <Kernel/FileSystem/FileSystem.h>
|
||||||
|
@ -53,8 +53,8 @@ public:
|
||||||
virtual NonnullRefPtr<Inode> to_inode(SysFS const& sysfs_instance) const override final;
|
virtual NonnullRefPtr<Inode> to_inode(SysFS const& sysfs_instance) const override final;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit SystemExposedFolder(String name);
|
explicit SystemExposedFolder(StringView name);
|
||||||
SystemExposedFolder(String name, SystemExposedFolder const& parent_folder);
|
SystemExposedFolder(StringView name, SystemExposedFolder const& parent_folder);
|
||||||
NonnullRefPtrVector<SystemExposedComponent> m_components;
|
NonnullRefPtrVector<SystemExposedComponent> m_components;
|
||||||
RefPtr<SystemExposedFolder> m_parent_folder;
|
RefPtr<SystemExposedFolder> m_parent_folder;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue