From 49403cbfa0399bb4284ea5c36cc90216a0bda6ff Mon Sep 17 00:00:00 2001 From: Nathan Franke Date: Thu, 9 Dec 2021 03:42:46 -0600 Subject: Replace String comparisons with "", String() to is_empty() Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings --- scene/gui/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui/control.cpp') diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 3a926b3fb5..249eb95ed8 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2791,7 +2791,7 @@ void Control::get_argument_options(const StringName &p_function, int p_idx, List TypedArray Control::get_configuration_warnings() const { TypedArray warnings = Node::get_configuration_warnings(); - if (data.mouse_filter == MOUSE_FILTER_IGNORE && data.tooltip != "") { + if (data.mouse_filter == MOUSE_FILTER_IGNORE && !data.tooltip.is_empty()) { warnings.push_back(TTR("The Hint Tooltip won't be displayed as the control's Mouse Filter is set to \"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\".")); } -- cgit v1.2.3