diff options
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index c69565c2f7..7ed8056826 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -670,7 +670,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o prefix = segment + prefix; } } - if (prefix != "") { + if (!prefix.is_empty()) { Ref<Font> font = _find_font(l.from); if (font.is_null()) { font = get_theme_font(SNAME("normal_font")); @@ -1423,7 +1423,7 @@ void RichTextLabel::_notification(int p_what) { } break; case NOTIFICATION_THEME_CHANGED: case NOTIFICATION_ENTER_TREE: { - if (text != "") { + if (!text.is_empty()) { set_text(text); } @@ -3853,7 +3853,7 @@ String RichTextLabel::get_selected_text() const { void RichTextLabel::selection_copy() { String text = get_selected_text(); - if (text != "") { + if (!text.is_empty()) { DisplayServer::get_singleton()->clipboard_set(text); } } @@ -4005,7 +4005,7 @@ float RichTextLabel::get_percent_visible() const { void RichTextLabel::set_effects(Array p_effects) { custom_effects = p_effects; - if ((text != "") && use_bbcode) { + if ((!text.is_empty()) && use_bbcode) { parse_bbcode(text); } } @@ -4020,7 +4020,7 @@ void RichTextLabel::install_effect(const Variant effect) { if (rteffect.is_valid()) { custom_effects.push_back(effect); - if ((text != "") && use_bbcode) { + if ((!text.is_empty()) && use_bbcode) { parse_bbcode(text); } } |