diff --git a/source/gui/CInput.cpp b/source/gui/CInput.cpp index 02791f42ef..921fb11d5b 100644 --- a/source/gui/CInput.cpp +++ b/source/gui/CInput.cpp @@ -1873,9 +1873,7 @@ void CInput::UpdateText(int from, int to_before, int to_after) check_point_row_start = check_point_row_end = -1; } - // set 'from' to the from row we'll destroy - // and 'to' to 'to_after' - from = destroy_row_from->m_ListStart; + destroy_row_from->m_ListStart; if (destroy_row_to != m_CharacterPositions.end()) to = destroy_row_to->m_ListStart; // notice it will iterate [from, to[, so it will never reach to. diff --git a/source/scriptinterface/ScriptRuntime.cpp b/source/scriptinterface/ScriptRuntime.cpp index da1458f3a0..eb49a93228 100644 --- a/source/scriptinterface/ScriptRuntime.cpp +++ b/source/scriptinterface/ScriptRuntime.cpp @@ -333,8 +333,6 @@ void* ScriptRuntime::jshook_function(JSContext* cx, JSAbstractFramePtr fp, bool void ScriptRuntime::PrepareContextsForIncrementalGC() { - for (std::list::iterator itr = m_Contexts.begin(); itr != m_Contexts.end(); itr++) - { - JS::PrepareZoneForGC(js::GetCompartmentZone(js::GetContextCompartment(*itr))); - } + for (JSContext* const& ctx : m_Contexts) + JS::PrepareZoneForGC(js::GetCompartmentZone(js::GetContextCompartment(ctx))); } diff --git a/source/third_party/tinygettext/src/dictionary_manager.cpp b/source/third_party/tinygettext/src/dictionary_manager.cpp index f65aba5567..3c183ab132 100644 --- a/source/third_party/tinygettext/src/dictionary_manager.cpp +++ b/source/third_party/tinygettext/src/dictionary_manager.cpp @@ -121,7 +121,7 @@ DictionaryManager::get_dictionary(const Language& language) std::string best_filename; int best_score = 0; - for(std::vector::iterator filename = files.begin(); filename != files.end(); filename++) + for (std::vector::iterator filename = files.begin(); filename != files.end(); ++filename) { // check if filename matches requested language if (has_suffix(*filename, ".po"))