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/graph_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/gui/graph_node.cpp') diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp index 3177911a70..7a7b35585e 100644 --- a/scene/gui/graph_node.cpp +++ b/scene/gui/graph_node.cpp @@ -458,7 +458,7 @@ void GraphNode::_shape() { } else { title_buf->set_direction((TextServer::Direction)text_direction); } - title_buf->add_string(title, font, font_size, opentype_features, (language != "") ? language : TranslationServer::get_singleton()->get_tool_locale()); + title_buf->add_string(title, font, font_size, opentype_features, (!language.is_empty()) ? language : TranslationServer::get_singleton()->get_tool_locale()); } #ifdef TOOLS_ENABLED -- cgit v1.2.3