Fixes minor issues found by static analyzer

This commit is contained in:
qarmin
2019-07-07 23:08:51 +02:00
parent d897131ac5
commit 9a77d748c0
26 changed files with 39 additions and 45 deletions

View File

@ -337,7 +337,7 @@ bool EditorHelpSearch::Runner::_phase_match_classes() {
if (term.length() > 1) {
if (search_flags & SEARCH_METHODS)
for (int i = 0; i < class_doc.methods.size(); i++) {
String method_name = search_flags & SEARCH_CASE_SENSITIVE ? class_doc.methods[i].name : class_doc.methods[i].name.to_lower();
String method_name = (search_flags & SEARCH_CASE_SENSITIVE) ? class_doc.methods[i].name : class_doc.methods[i].name.to_lower();
if (method_name.find(term) > -1 ||
(term.begins_with(".") && method_name.begins_with(term.right(1))) ||
(term.ends_with("(") && method_name.ends_with(term.left(term.length() - 1).strip_edges())) ||
@ -405,7 +405,7 @@ bool EditorHelpSearch::Runner::_phase_member_items() {
ClassMatch &match = iterator_match->value();
TreeItem *parent = search_flags & SEARCH_SHOW_HIERARCHY ? class_items[match.doc->name] : root_item;
TreeItem *parent = (search_flags & SEARCH_SHOW_HIERARCHY) ? class_items[match.doc->name] : root_item;
for (int i = 0; i < match.methods.size(); i++)
_create_method_item(parent, match.doc, match.methods[i]);
for (int i = 0; i < match.signals.size(); i++)