From 79240eab1ee4abb2882a40c7ac18e4915b4dc820 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Tue, 15 Dec 2020 00:22:04 +0100 Subject: Codechange: Make use of the improved C++17 emplace_back function. --- src/stringfilter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/stringfilter.cpp') diff --git a/src/stringfilter.cpp b/src/stringfilter.cpp index 30876a82d..4765a880e 100644 --- a/src/stringfilter.cpp +++ b/src/stringfilter.cpp @@ -74,8 +74,7 @@ void StringFilter::SetFilterTerm(const char *str) /* Add to word */ if (word == nullptr) { - /*C++17: word = &*/ this->word_index.push_back({dest, false}); - word = &this->word_index.back(); + word = &this->word_index.emplace_back(WordState{ dest, false }); } memcpy(dest, pos, len); -- cgit v1.2.3-54-g00ecf