Codechange: Make use of the improved C++17 emplace_back function.

This commit is contained in:
Michael Lutz
2020-12-15 00:22:04 +01:00
parent cc1679e317
commit 79240eab1e
14 changed files with 22 additions and 44 deletions

View File

@@ -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);