config/Path: use std::string_view instead of StringView

This commit is contained in:
Max Kellermann 2022-07-04 14:38:10 +02:00
parent c7d2cb855a
commit bd32b229b5
3 changed files with 2 additions and 5 deletions

View File

@ -27,7 +27,6 @@
#include "util/OffsetPointer.hxx"
#include "util/ScopeExit.hxx"
#include "util/StringCompare.hxx"
#include "util/StringView.hxx"
#include "util/UriExtract.hxx"
#include "tag/Handler.hxx"
#include "tag/Generic.hxx"

View File

@ -37,7 +37,6 @@
#include "time/ChronoUtil.hxx"
#include "util/UriUtil.hxx"
#include "util/StringAPI.hxx"
#include "util/StringView.hxx"
#include "fs/AllocatedPath.hxx"
#include "Stats.hxx"
#include "PlaylistFile.hxx"

View File

@ -23,7 +23,7 @@
#include "fs/Traits.hxx"
#include "fs/StandardDirectory.hxx"
#include "util/RuntimeError.hxx"
#include "util/StringView.hxx"
#include "util/StringSplit.hxx"
#include <cassert>
@ -101,8 +101,7 @@ ParsePath(const char *path)
return GetConfiguredHome() /
AllocatedPath::FromUTF8Throw(path);
} else {
const auto [user, rest] =
StringView{path}.Split('/');
const auto [user, rest] = Split(std::string_view{path}, '/');
return GetHome(std::string{user}.c_str())
/ AllocatedPath::FromUTF8Throw(rest);