You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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:
@@ -372,7 +372,7 @@ static Variant create_var(RS::GlobalVariableType p_type) {
|
||||
|
||||
void ShaderGlobalsEditor::_variable_added() {
|
||||
String var = variable_name->get_text().strip_edges();
|
||||
if (var == "" || !var.is_valid_identifier()) {
|
||||
if (var.is_empty() || !var.is_valid_identifier()) {
|
||||
EditorNode::get_singleton()->show_warning(TTR("Please specify a valid variable identifier name."));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user