Fix some issues found by static analysis (clang-analyzer and cppcheck).
This was SVN commit r16801.
This commit is contained in:
parent
caa8f51c2e
commit
5a0b9b0e70
@ -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.
|
||||
|
@ -333,8 +333,6 @@ void* ScriptRuntime::jshook_function(JSContext* cx, JSAbstractFramePtr fp, bool
|
||||
|
||||
void ScriptRuntime::PrepareContextsForIncrementalGC()
|
||||
{
|
||||
for (std::list<JSContext*>::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)));
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ DictionaryManager::get_dictionary(const Language& language)
|
||||
std::string best_filename;
|
||||
int best_score = 0;
|
||||
|
||||
for(std::vector<std::string>::iterator filename = files.begin(); filename != files.end(); filename++)
|
||||
for (std::vector<std::string>::iterator filename = files.begin(); filename != files.end(); ++filename)
|
||||
{
|
||||
// check if filename matches requested language
|
||||
if (has_suffix(*filename, ".po"))
|
||||
|
Loading…
Reference in New Issue
Block a user