From ef7c7fa9b48cd1af1c4adff5f82062e2051be7c5 Mon Sep 17 00:00:00 2001 From: Timothy Stack Date: Wed, 6 Jul 2022 22:57:53 -0700 Subject: [PATCH] [build] remove use of --- src/base/lnav.console.hh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/base/lnav.console.hh b/src/base/lnav.console.hh index 75c0ad35..ac4c2b09 100644 --- a/src/base/lnav.console.hh +++ b/src/base/lnav.console.hh @@ -120,11 +120,14 @@ struct user_message { std::make_move_iterator(std::begin(snippets)), std::make_move_iterator(std::end(snippets))); if (this->um_snippets.size() > 1) { - auto last_iter = std::remove_if( - this->um_snippets.begin(), - this->um_snippets.end(), - [](const auto& elem) { return elem.s_content.empty(); }); - this->um_snippets.erase(last_iter, this->um_snippets.end()); + for (auto iter = this->um_snippets.begin(); + iter != this->um_snippets.end();) { + if (iter->s_content.empty()) { + iter = this->um_snippets.erase(iter); + } else { + ++iter; + } + } } return *this; }