diff options
Diffstat (limited to 'modules/visual_script/visual_script_nodes.cpp')
-rw-r--r-- | modules/visual_script/visual_script_nodes.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index b0af030981..fccdab1a64 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -1307,7 +1307,7 @@ void VisualScriptVariableGet::_validate_property(PropertyInfo &property) const { String vhint; for (const StringName &E : vars) { - if (vhint != String()) { + if (!vhint.is_empty()) { vhint += ","; } @@ -1417,7 +1417,7 @@ void VisualScriptVariableSet::_validate_property(PropertyInfo &property) const { String vhint; for (const StringName &E : vars) { - if (vhint != String()) { + if (!vhint.is_empty()) { vhint += ","; } @@ -1615,7 +1615,7 @@ PropertyInfo VisualScriptPreload::get_output_value_port_info(int p_idx) const { pinfo.hint_string = preload->get_class(); if (preload->get_path().is_resource_file()) { pinfo.name = preload->get_path(); - } else if (preload->get_name() != String()) { + } else if (!preload->get_name().is_empty()) { pinfo.name = preload->get_name(); } else { pinfo.name = preload->get_class(); @@ -1994,7 +1994,7 @@ void VisualScriptClassConstant::_validate_property(PropertyInfo &property) const property.hint_string = ""; for (const String &E : constants) { - if (property.hint_string != String()) { + if (!property.hint_string.is_empty()) { property.hint_string += ","; } property.hint_string += E; @@ -2132,7 +2132,7 @@ void VisualScriptBasicTypeConstant::_validate_property(PropertyInfo &property) c } property.hint_string = ""; for (const StringName &E : constants) { - if (property.hint_string != String()) { + if (!property.hint_string.is_empty()) { property.hint_string += ","; } property.hint_string += String(E); @@ -2363,7 +2363,7 @@ void VisualScriptEngineSingleton::_validate_property(PropertyInfo &property) con continue; //skip these, too simple named } - if (cc != String()) { + if (!cc.is_empty()) { cc += ","; } cc += E.name; @@ -3147,7 +3147,7 @@ String VisualScriptSubCall::get_caption() const { String VisualScriptSubCall::get_text() const { Ref<Script> script = get_script(); if (script.is_valid()) { - if (script->get_name() != String()) { + if (!script->get_name().is_empty()) { return script->get_name(); } if (script->get_path().is_resource_file()) { @@ -3786,7 +3786,7 @@ void VisualScriptInputAction::_validate_property(PropertyInfo &property) const { al.sort(); for (int i = 0; i < al.size(); i++) { - if (actions != String()) { + if (!actions.is_empty()) { actions += ","; } actions += al[i]; |