From c9f43996f3147100627ee2c6f9da993ceb160113 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Apr 2012 02:26:34 +0300 Subject: Improve iterators part 2. --- src/spellmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/spellmanager.cpp') diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp index 854e1f918..ed6989280 100644 --- a/src/spellmanager.cpp +++ b/src/spellmanager.cpp @@ -352,10 +352,11 @@ void SpellManager::save() std::string SpellManager::autoComplete(std::string partName) { std::vector::const_iterator i = mSpellsVector.begin(); + std::vector::const_iterator i_end = mSpellsVector.end(); std::string newName = ""; TextCommand *newCommand = nullptr; - while (i != mSpellsVector.end()) + while (i != i_end) { TextCommand *cmd = *i; std::string line = cmd->getCommand(); -- cgit v1.2.3-70-g09d2