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:
@@ -71,7 +71,7 @@ String TextEditor::get_name() {
|
||||
name = TTR("[unsaved]");
|
||||
} else if (text_file->is_built_in()) {
|
||||
const String &text_file_name = text_file->get_name();
|
||||
if (text_file_name != "") {
|
||||
if (!text_file_name.is_empty()) {
|
||||
// If the built-in text_file has a custom resource name defined,
|
||||
// display the built-in text_file name as follows: `ResourceName (scene_file.tscn)`
|
||||
name = vformat("%s (%s)", text_file_name, name.get_slice("::", 0));
|
||||
|
||||
Reference in New Issue
Block a user