You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Replace String comparisons with "", String() to is_empty()
Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
This commit is contained in:
@@ -1665,8 +1665,8 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
|
||||
String err_func = p_method;
|
||||
int err_line = current_node_id; // Not a line but it works as one.
|
||||
|
||||
if (node && (r_error.error != Callable::CallError::CALL_ERROR_INVALID_METHOD || error_str == String())) {
|
||||
if (error_str != String()) {
|
||||
if (node && (r_error.error != Callable::CallError::CALL_ERROR_INVALID_METHOD || error_str.is_empty())) {
|
||||
if (!error_str.is_empty()) {
|
||||
error_str += " ";
|
||||
}
|
||||
|
||||
@@ -2379,7 +2379,7 @@ void VisualScriptLanguage::debug_get_stack_level_locals(int p_level, List<String
|
||||
|
||||
for (int i = 0; i < node->input_port_count; i++) {
|
||||
String name = node->get_base_node()->get_input_value_port_info(i).name;
|
||||
if (name == String()) {
|
||||
if (name.is_empty()) {
|
||||
name = "in_" + itos(i);
|
||||
}
|
||||
|
||||
@@ -2399,7 +2399,7 @@ void VisualScriptLanguage::debug_get_stack_level_locals(int p_level, List<String
|
||||
|
||||
for (int i = 0; i < node->output_port_count; i++) {
|
||||
String name = node->get_base_node()->get_output_value_port_info(i).name;
|
||||
if (name == String()) {
|
||||
if (name.is_empty()) {
|
||||
name = "out_" + itos(i);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user