lib/upnp/Util: pass std::string_view to path_getfather()
This commit is contained in:
parent
8d1b73ae89
commit
d5f7db59a8
@ -27,9 +27,9 @@ path_catslash(std::string &s) noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
path_getfather(const std::string &s) noexcept
|
path_getfather(const std::string_view s) noexcept
|
||||||
{
|
{
|
||||||
std::string father = s;
|
std::string father{s};
|
||||||
|
|
||||||
// ??
|
// ??
|
||||||
if (father.empty())
|
if (father.empty())
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
// Copyright The Music Player Daemon Project
|
// Copyright The Music Player Daemon Project
|
||||||
|
|
||||||
#ifndef MPD_UPNP_UTIL_HXX
|
#pragma once
|
||||||
#define MPD_UPNP_UTIL_HXX
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -10,6 +9,4 @@ void
|
|||||||
trimstring(std::string &s, const char *ws = " \t\n") noexcept;
|
trimstring(std::string &s, const char *ws = " \t\n") noexcept;
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
path_getfather(const std::string &s) noexcept;
|
path_getfather(std::string_view s) noexcept;
|
||||||
|
|
||||||
#endif /* _UPNPP_H_X_INCLUDED_ */
|
|
||||||
|
Loading…
Reference in New Issue
Block a user