diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-11 00:55:02 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-11 01:27:46 +0100 |
commit | 8b1108e4858f797c9216dc8ae4a3918ad50c73b4 (patch) | |
tree | ca64ba25aa735d25013d76c6d83570496c742014 /AK/LexicalPath.h | |
parent | ad5d217e760c7fb73ffc0c4c827d767d6be8ec80 (diff) | |
download | serenity-8b1108e4858f797c9216dc8ae4a3918ad50c73b4.zip |
Everywhere: Pass AK::StringView by value
Diffstat (limited to 'AK/LexicalPath.h')
-rw-r--r-- | AK/LexicalPath.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/AK/LexicalPath.h b/AK/LexicalPath.h index 562adbe83b..98e11a97c0 100644 --- a/AK/LexicalPath.h +++ b/AK/LexicalPath.h @@ -19,22 +19,22 @@ public: bool is_absolute() const { return !m_string.is_empty() && m_string[0] == '/'; } String const& string() const { return m_string; } - StringView const& dirname() const { return m_dirname; } - StringView const& basename() const { return m_basename; } - StringView const& title() const { return m_title; } - StringView const& extension() const { return m_extension; } + StringView dirname() const { return m_dirname; } + StringView basename() const { return m_basename; } + StringView title() const { return m_title; } + StringView extension() const { return m_extension; } Vector<StringView> const& parts_view() const { return m_parts; } [[nodiscard]] Vector<String> parts() const; - bool has_extension(StringView const&) const; + bool has_extension(StringView) const; - [[nodiscard]] LexicalPath append(StringView const&) const; + [[nodiscard]] LexicalPath append(StringView) const; [[nodiscard]] LexicalPath parent() const; [[nodiscard]] static String canonicalized_path(String); [[nodiscard]] static String absolute_path(String dir_path, String target); - [[nodiscard]] static String relative_path(StringView const& absolute_path, StringView const& prefix); + [[nodiscard]] static String relative_path(StringView absolute_path, StringView prefix); template<typename... S> [[nodiscard]] static LexicalPath join(StringView first, S&&... rest) |