mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +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:
parent
31ded7e126
commit
49403cbfa0
226 changed files with 1051 additions and 1034 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue