Make contains() more general

Allow contains() to find arbitrary values in arbitrary vectors, and adopt it
in place of std::find.
This commit is contained in:
ridiculousfish
2018-08-11 19:55:06 -07:00
parent b0dc715d18
commit 1473f952d4
9 changed files with 15 additions and 19 deletions

View File

@@ -26,7 +26,7 @@ void kill_add(const wcstring &str) {
/// Remove first match for specified string from circular list.
static void kill_remove(const wcstring &s) {
ASSERT_IS_MAIN_THREAD();
kill_list_t::iterator iter = std::find(kill_list.begin(), kill_list.end(), s);
auto iter = std::find(kill_list.begin(), kill_list.end(), s);
if (iter != kill_list.end()) kill_list.erase(iter);
}