diff --git a/libtransmission/tr-strbuf.h b/libtransmission/tr-strbuf.h index 977fad596..824badb29 100644 --- a/libtransmission/tr-strbuf.h +++ b/libtransmission/tr-strbuf.h @@ -251,26 +251,6 @@ public: /// - template - void join(Char delim, Args const&... args) - { - ((append(args), append(delim)), ...); - resize(size() - 1); - } - - template - void join(ContiguousRange const& delim, Args const&... args) - { - ((append(args), append(delim)), ...); - resize(size() - std::size(delim)); - } - - template - void join(Char const* sz_delim, Args const&... args) - { - join(std::basic_string_view{ sz_delim }, args...); - } - // NOLINTNEXTLINE(google-explicit-constructor) [[nodiscard]] constexpr operator std::basic_string_view() const noexcept { diff --git a/tests/libtransmission/strbuf-test.cc b/tests/libtransmission/strbuf-test.cc index b99c986a5..93b9c6424 100644 --- a/tests/libtransmission/strbuf-test.cc +++ b/tests/libtransmission/strbuf-test.cc @@ -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;