summaryrefslogtreecommitdiff
path: root/src/fs/Traits.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-03-13 19:49:46 +0100
committerMax Kellermann <max@musicpd.org>2020-03-13 19:55:28 +0100
commita885bdba4ce2c3a077bc5e6c9654793dbe70bf3c (patch)
tree08e4b520054c890116631b3f603e9f4a7a38a3c6 /src/fs/Traits.hxx
parentb6b15afb5ae9a7a3b37b0e02f7715b915a174f46 (diff)
fs/Traits: pass string_view to Build()
Diffstat (limited to 'src/fs/Traits.hxx')
-rw-r--r--src/fs/Traits.hxx20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/fs/Traits.hxx b/src/fs/Traits.hxx
index 72cdc0ba2..c604110bc 100644
--- a/src/fs/Traits.hxx
+++ b/src/fs/Traits.hxx
@@ -156,14 +156,8 @@ struct PathTraitsFS {
* remaining component is returned unchanged.
* If both components are empty strings, empty string is returned.
*/
- gcc_pure gcc_nonnull_all
- static string Build(const_pointer a, size_t a_size,
- const_pointer b, size_t b_size) noexcept;
-
- gcc_pure gcc_nonnull_all
- static string Build(const_pointer a, const_pointer b) noexcept {
- return Build(a, GetLength(a), b, GetLength(b));
- }
+ gcc_pure
+ static string Build(string_view a, string_view b) noexcept;
/**
* Interpret the given path as being relative to the given
@@ -271,14 +265,8 @@ struct PathTraitsUTF8 {
* remaining component is returned unchanged.
* If both components are empty strings, empty string is returned.
*/
- gcc_pure gcc_nonnull_all
- static string Build(const_pointer a, size_t a_size,
- const_pointer b, size_t b_size) noexcept;
-
- gcc_pure gcc_nonnull_all
- static string Build(const_pointer a, const_pointer b) noexcept {
- return Build(a, GetLength(a), b, GetLength(b));
- }
+ gcc_pure
+ static string Build(string_view a, string_view b) noexcept;
};
#endif