mirror of
https://github.com/transmission/transmission.git
synced 2026-02-15 07:26:49 +00:00
fix: remove unused tr_strbuf::join() (#8145)
This commit is contained in:
@@ -251,26 +251,6 @@ public:
|
||||
|
||||
///
|
||||
|
||||
template<typename... Args>
|
||||
void join(Char delim, Args const&... args)
|
||||
{
|
||||
((append(args), append(delim)), ...);
|
||||
resize(size() - 1);
|
||||
}
|
||||
|
||||
template<typename ContiguousRange, typename... Args>
|
||||
void join(ContiguousRange const& delim, Args const&... args)
|
||||
{
|
||||
((append(args), append(delim)), ...);
|
||||
resize(size() - std::size(delim));
|
||||
}
|
||||
|
||||
template<typename... Args>
|
||||
void join(Char const* sz_delim, Args const&... args)
|
||||
{
|
||||
join(std::basic_string_view<Char>{ sz_delim }, args...);
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(google-explicit-constructor)
|
||||
[[nodiscard]] constexpr operator std::basic_string_view<Char>() const noexcept
|
||||
{
|
||||
|
||||
@@ -136,23 +136,6 @@ TEST_F(StrbufTest, iterators)
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(StrbufTest, join)
|
||||
{
|
||||
auto buf = tr_pathbuf{};
|
||||
|
||||
buf.clear();
|
||||
buf.join(' ', 'A', "short", "phrase"sv);
|
||||
EXPECT_EQ("A short phrase"sv, buf.sv());
|
||||
|
||||
buf.clear();
|
||||
buf.join(" ", 'A', "short", "phrase"sv);
|
||||
EXPECT_EQ("A short phrase"sv, buf.sv());
|
||||
|
||||
buf.clear();
|
||||
buf.join("--"sv, 'A', "short", "phrase"sv);
|
||||
EXPECT_EQ("A--short--phrase"sv, buf.sv());
|
||||
}
|
||||
|
||||
TEST_F(StrbufTest, move)
|
||||
{
|
||||
static auto constexpr Value = "/hello/world"sv;
|
||||
|
||||
Reference in New Issue
Block a user