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

@ -10,9 +10,9 @@ public:
explicit FileSystemPath(const StringView&);
bool is_valid() const { return m_is_valid; }
String string() const { return m_string; }
const String& string() const { return m_string; }
String basename() const { return m_basename; }
const String& basename() const { return m_basename; }
const Vector<String>& parts() const { return m_parts; }