summaryrefslogtreecommitdiff
path: root/editor/property_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/property_editor.cpp')
-rw-r--r--editor/property_editor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 01eae1e4ec..abe1bcf9e5 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -482,7 +482,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
Vector<String> flags = hint_text.split(",");
for (int i = 0; i < flags.size(); i++) {
String flag = flags[i];
- if (flag == "") {
+ if (flag.is_empty()) {
continue;
}
menu->add_check_item(flag, i);
@@ -552,7 +552,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
add_child(create_dialog);
}
- if (hint_text != String()) {
+ if (!hint_text.is_empty()) {
create_dialog->set_base_type(hint_text);
} else {
create_dialog->set_base_type("Object");
@@ -853,7 +853,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
if (p_name == "script" && hint_text == "Script" && Object::cast_to<Node>(owner)) {
menu->add_item(TTR("New Script"), OBJ_MENU_NEW_SCRIPT);
menu->add_separator();
- } else if (hint_text != "") {
+ } else if (!hint_text.is_empty()) {
int idx = 0;
Vector<EditorData::CustomType> custom_resources;
@@ -933,7 +933,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
RES cb = EditorSettings::get_singleton()->get_resource_clipboard();
bool paste_valid = false;
if (cb.is_valid()) {
- if (hint_text == "") {
+ if (hint_text.is_empty()) {
paste_valid = true;
} else {
for (int i = 0; i < hint_text.get_slice_count(","); i++) {
@@ -1108,7 +1108,7 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
return;
}
- if (hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && hint_text != String()) {
+ if (hint == PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && !hint_text.is_empty()) {
Node *node = get_node(hint_text);
if (node) {
Node *tonode = node->get_node(p_path);
@@ -1191,7 +1191,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
file->clear_filters();
- if (hint_text != "") {
+ if (!hint_text.is_empty()) {
Vector<String> extensions = hint_text.split(",");
for (int i = 0; i < extensions.size(); i++) {
String filter = extensions[i];