1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:07:34 +00:00

AK: Use canonicalized_path in LexicalPath::relative_path

This avoids construction of LexicalPath objects.
This commit is contained in:
Max Wipfli 2021-06-29 20:59:38 +02:00 committed by Andreas Kling
parent 36c3962670
commit fb8bbdabb7
2 changed files with 24 additions and 11 deletions

View file

@ -33,7 +33,7 @@ public:
[[nodiscard]] LexicalPath parent() const;
[[nodiscard]] static String canonicalized_path(String);
[[nodiscard]] static String relative_path(String absolute_path, String const& prefix);
[[nodiscard]] static String relative_path(StringView const& absolute_path, StringView const& prefix);
template<typename... S>
[[nodiscard]] static LexicalPath join(String const& first, S&&... rest)