Add some code changes/fixes proposed by Coverity and Clang Tidy

This commit is contained in:
qarmin 2019-08-07 12:54:30 +02:00
parent 045ab51ae5
commit e0b5b21863
26 changed files with 65 additions and 58 deletions

View file

@ -130,12 +130,14 @@ void VisualScriptPropertySelector::_update_search() {
{
String b = String(E->get());
category = search_options->create_item(root);
category->set_text(0, b.replace_first("*", ""));
category->set_selectable(0, false);
Ref<Texture> icon;
String rep = b.replace("*", "");
icon = EditorNode::get_singleton()->get_class_icon(rep);
category->set_icon(0, icon);
if (category) {
category->set_text(0, b.replace_first("*", ""));
category->set_selectable(0, false);
Ref<Texture> icon;
String rep = b.replace("*", "");
icon = EditorNode::get_singleton()->get_class_icon(rep);
category->set_icon(0, icon);
}
}
if (properties || seq_connect) {
if (instance) {