storage/Composite: use std::string_view

This commit is contained in:
Max Kellermann 2022-07-01 11:12:36 +02:00
parent 6d23ac67f9
commit e6bb6c59ec

View File

@ -22,6 +22,7 @@
#include "fs/AllocatedPath.hxx" #include "fs/AllocatedPath.hxx"
#include "util/IterableSplitString.hxx" #include "util/IterableSplitString.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include "util/StringSplit.hxx"
#include <set> #include <set>
#include <stdexcept> #include <stdexcept>
@ -86,8 +87,7 @@ CompositeDirectoryReader::GetInfo(bool follow)
static std::string_view static std::string_view
NextSegment(std::string_view &uri_r) noexcept NextSegment(std::string_view &uri_r) noexcept
{ {
StringView uri(uri_r); auto s = Split(uri_r, '/');
auto s = uri.Split('/');
uri_r = s.second; uri_r = s.second;
return s.first; return s.first;
} }