From c9ad8880fbb67d4a3601de0800ad0ca2678d0ef8 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Wed, 18 Aug 2021 00:41:34 -0600 Subject: [PATCH] fix garbage filter bug --- extensions/translatewrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/translatewrapper.cpp b/extensions/translatewrapper.cpp index 9631dc2..8678650 100644 --- a/extensions/translatewrapper.cpp +++ b/extensions/translatewrapper.cpp @@ -185,7 +185,7 @@ bool ProcessSentence(std::wstring& sentence, SentenceInfo sentenceInfo) if (useFilter) { Trim(sentence); - sentence.erase(std::find_if(sentence.begin(), sentence.end(), [](wchar_t ch) { return ch < ' ' && ch != '\n'; }), sentence.end()); + sentence.erase(std::remove_if(sentence.begin(), sentence.end(), [](wchar_t ch) { return ch < ' ' && ch != '\n'; }), sentence.end()); } if (useCache) {