1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +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

@ -15,7 +15,7 @@ public:
static KResult unlink(const String& name);
virtual ~SharedMemory() override;
String name() const { return m_name; }
const String& name() const { return m_name; }
virtual KResult truncate(off_t) override;
VMObject* vmo() { return m_vmo.ptr(); }
const VMObject* vmo() const { return m_vmo.ptr(); }