From 68e50dcd3cae6605272538c57c05dce69afd3a77 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 7 Nov 2016 15:41:30 +1300 Subject: [PATCH] Cleanup: remove unused wordlist API functions --- src/tests/stub_wordlist.cc | 2 -- src/wordlist.cc | 22 ---------------------- src/wordlist.h | 12 ------------ 3 files changed, 36 deletions(-) diff --git a/src/tests/stub_wordlist.cc b/src/tests/stub_wordlist.cc index 63d6d2d08f..947e320155 100644 --- a/src/tests/stub_wordlist.cc +++ b/src/tests/stub_wordlist.cc @@ -13,7 +13,5 @@ #include "tests/STUB.h" const char *wordlistAdd(wordlist **, const char *) STUB_RETVAL(NULL) -void wordlistAddWl(wordlist **, wordlist *) STUB -void wordlistJoin(wordlist **, wordlist **) STUB void wordlistDestroy(wordlist **) STUB diff --git a/src/wordlist.cc b/src/wordlist.cc index c1982789d8..4b5abd4782 100644 --- a/src/wordlist.cc +++ b/src/wordlist.cc @@ -31,28 +31,6 @@ wordlistAdd(wordlist ** list, const char *key) return (*list)->key; } -void -wordlistJoin(wordlist ** list, wordlist ** wl) -{ - while (*list) - list = &(*list)->next; - - *list = *wl; - - *wl = NULL; -} - -void -wordlistAddWl(wordlist ** list, wordlist * wl) -{ - while (*list) - list = &(*list)->next; - - for (; wl; wl = wl->next, list = &(*list)->next) { - *list = new wordlist(wl->key); - } -} - void wordlistCat(const wordlist * w, MemBuf * mb) { diff --git a/src/wordlist.h b/src/wordlist.h index 0712bd418e..5a1a776851 100644 --- a/src/wordlist.h +++ b/src/wordlist.h @@ -52,18 +52,6 @@ const char *wordlistAdd(wordlist **, const char *); */ void wordlistCat(const wordlist *, MemBuf *); -/** append a wordlist to another - * - * \deprecated use SBufList.merge(otherwordlist) instead - */ -void wordlistAddWl(wordlist **, wordlist *); - -/** Concatenate the words in a wordlist - * - * \deprecated use SBufListContainerJoin(SBuf()) from sbuf/Algorithms.h instead - */ -void wordlistJoin(wordlist **, wordlist **); - /// destroy a wordlist void wordlistDestroy(wordlist **); -- 2.39.2