From 3992b9aa302802115fc3066ee227dd7f90c70668 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Wed, 9 Sep 2009 20:02:43 +0200 Subject: [PATCH] ugh. remove this pattern from list using std::list::remove instead of iteration --- src/tag_editor.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index a5c43b44..8ac2dd2a 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -458,9 +458,7 @@ void TagEditor::EnterPressed() } else if (success) { - for (std::list::iterator it = Patterns.begin(); it != Patterns.end(); ++it) - if (*it == Config.pattern) - --(it = Patterns.erase(it)); + Patterns.remove(Config.pattern); Patterns.insert(Patterns.begin(), Config.pattern); quit = 1; }