Make reader_history_search_t::matches a vector instead of a deque

It is used exclusively as vector at the moment since we only ever append
at the end.  Making it a deque would be useful when allowing to edit the
search string and subsequently resume the search at an arbitrary position
in the history.
This commit is contained in:
Johannes Altmanninger 2020-02-09 18:39:14 +01:00
parent 971c2eb668
commit 2b3b460264

View File

@ -39,7 +39,6 @@
#include <atomic>
#include <csignal>
#include <cwchar>
#include <deque>
#include <functional>
#include <memory>
#include <set>
@ -305,7 +304,7 @@ class reader_history_search_t {
history_search_t search_;
/// The ordered list of matches. This may grow long.
std::deque<wcstring> matches_;
std::vector<wcstring> matches_;
/// A set of new items to skip, corresponding to matches_ and anything added in skip().
std::set<wcstring> skips_;