1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:17:45 +00:00

Kernel: Tweak some String&& => const String&.

String&& is just not very practical. Also return const String& when the
returned string is a member variable. The call site is free to make a copy
if he wants, but otherwise we can avoid the retain count churn.
This commit is contained in:
Andreas Kling 2019-06-07 20:58:12 +02:00
parent 736092a087
commit de65c960e9
7 changed files with 23 additions and 23 deletions

View file

@ -18,9 +18,9 @@ public:
Execute = 4,
};
Region(const Range&, String&&, byte access, bool cow = false);
Region(const Range&, Retained<VMObject>&&, size_t offset_in_vmo, String&&, byte access, bool cow = false);
Region(const Range&, RetainPtr<Inode>&&, String&&, byte access);
Region(const Range&, const String&, byte access, bool cow = false);
Region(const Range&, Retained<VMObject>&&, size_t offset_in_vmo, const String&, byte access, bool cow = false);
Region(const Range&, RetainPtr<Inode>&&, const String&, byte access);
~Region();
VirtualAddress vaddr() const { return m_range.base(); }
@ -28,9 +28,9 @@ public:
bool is_readable() const { return m_access & Access::Read; }
bool is_writable() const { return m_access & Access::Write; }
bool is_executable() const { return m_access & Access::Execute; }
String name() const { return m_name; }
const String& name() const { return m_name; }
void set_name(String&& name) { m_name = move(name); }
void set_name(const String& name) { m_name = name; }
const VMObject& vmo() const { return *m_vmo; }
VMObject& vmo() { return *m_vmo; }