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
commit de65c960e9
Notes: sideshowbarker 2024-07-19 13:40:43 +09:00
7 changed files with 23 additions and 23 deletions

View file

@ -30,7 +30,7 @@ public:
const Inode* inode() const { return m_inode.ptr(); }
size_t inode_offset() const { return m_inode_offset; }
String name() const { return m_name; }
const String& name() const { return m_name; }
void set_name(const String& name) { m_name = name; }
size_t page_count() const { return m_size / PAGE_SIZE; }