diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-07 20:58:12 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-07 20:58:12 +0200 |
commit | de65c960e9591a5a272d3d4fdc04ec0658dd3566 (patch) | |
tree | e5eb91dc2c97ccd9c498cac383aa31dda6ec8ed9 /Kernel/SharedMemory.h | |
parent | 736092a0876b115c4131ea114fda81eb52bc3d2e (diff) | |
download | serenity-de65c960e9591a5a272d3d4fdc04ec0658dd3566.zip |
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.
Diffstat (limited to 'Kernel/SharedMemory.h')
-rw-r--r-- | Kernel/SharedMemory.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/SharedMemory.h b/Kernel/SharedMemory.h index b4a503585a..f7ec96f495 100644 --- a/Kernel/SharedMemory.h +++ b/Kernel/SharedMemory.h @@ -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(); } |