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
|
||||
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())
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
// Copyright The Music Player Daemon Project
|
||||
|
||||
#ifndef MPD_UPNP_UTIL_HXX
|
||||
#define MPD_UPNP_UTIL_HXX
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -10,6 +9,4 @@ void
|
|||
trimstring(std::string &s, const char *ws = " \t\n") noexcept;
|
||||
|
||||
std::string
|
||||
path_getfather(const std::string &s) noexcept;
|
||||
|
||||
#endif /* _UPNPP_H_X_INCLUDED_ */
|
||||
path_getfather(std::string_view s) noexcept;
|
||||
|
|
Loading…
Reference in New Issue