fix some warnings detected with clang
This commit is contained in:
parent
5936aa6710
commit
fd8517f91e
|
@ -177,6 +177,7 @@ bool Buffer::undo()
|
||||||
|
|
||||||
for (const Modification& modification : reversed(*m_history_cursor))
|
for (const Modification& modification : reversed(*m_history_cursor))
|
||||||
apply_modification(modification.inverse());
|
apply_modification(modification.inverse());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Buffer::redo()
|
bool Buffer::redo()
|
||||||
|
@ -188,6 +189,7 @@ bool Buffer::redo()
|
||||||
apply_modification(modification);
|
apply_modification(modification);
|
||||||
|
|
||||||
++m_history_cursor;
|
++m_history_cursor;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Buffer::check_invariant() const
|
void Buffer::check_invariant() const
|
||||||
|
|
|
@ -855,7 +855,7 @@ void register_commands()
|
||||||
params[token_to_complete] : String();
|
params[token_to_complete] : String();
|
||||||
if (token_to_complete == 1 and params[0] == "-group")
|
if (token_to_complete == 1 and params[0] == "-group")
|
||||||
return w.highlighters().complete_group_id(arg, pos_in_token);
|
return w.highlighters().complete_group_id(arg, pos_in_token);
|
||||||
else if (token_to_complete == 0 or token_to_complete == 2 and params[0] == "-group")
|
else if (token_to_complete == 0 or (token_to_complete == 2 and params[0] == "-group"))
|
||||||
return HighlighterRegistry::instance().complete_highlighter(arg, pos_in_token);
|
return HighlighterRegistry::instance().complete_highlighter(arg, pos_in_token);
|
||||||
else
|
else
|
||||||
return CandidateList();
|
return CandidateList();
|
||||||
|
@ -883,7 +883,7 @@ void register_commands()
|
||||||
params[token_to_complete] : String();
|
params[token_to_complete] : String();
|
||||||
if (token_to_complete == 1 and params[0] == "-group")
|
if (token_to_complete == 1 and params[0] == "-group")
|
||||||
return w.filters().complete_group_id(arg, pos_in_token);
|
return w.filters().complete_group_id(arg, pos_in_token);
|
||||||
else if (token_to_complete == 0 or token_to_complete == 2 and params[0] == "-group")
|
else if (token_to_complete == 0 or (token_to_complete == 2 and params[0] == "-group"))
|
||||||
return FilterRegistry::instance().complete_filter(arg, pos_in_token);
|
return FilterRegistry::instance().complete_filter(arg, pos_in_token);
|
||||||
else
|
else
|
||||||
return CandidateList();
|
return CandidateList();
|
||||||
|
|
|
@ -27,7 +27,7 @@ void cleanup_whitespaces(Buffer& buffer, Modification& modification)
|
||||||
modification.content[0] == '\n' and not modification.position.is_begin())
|
modification.content[0] == '\n' and not modification.position.is_begin())
|
||||||
{
|
{
|
||||||
BufferIterator position = modification.position-1;
|
BufferIterator position = modification.position-1;
|
||||||
while (*position == ' ' or *position == '\t' and not position.is_begin())
|
while ((*position == ' ' or *position == '\t') and not position.is_begin())
|
||||||
--position;
|
--position;
|
||||||
++position;
|
++position;
|
||||||
if (position != modification.position)
|
if (position != modification.position)
|
||||||
|
|
|
@ -92,6 +92,8 @@ bool insert_char(IncrementalInserter& inserter, const Key& key)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user