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