You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +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:
@@ -136,7 +136,7 @@ void RotatedFileLogger::clear_old_backups() {
|
||||
da->list_dir_begin();
|
||||
String f = da->get_next();
|
||||
Set<String> backups;
|
||||
while (f != String()) {
|
||||
while (!f.is_empty()) {
|
||||
if (!da->current_is_dir() && f.begins_with(basename) && f.get_extension() == extension && f != base_path.get_file()) {
|
||||
backups.insert(f);
|
||||
}
|
||||
@@ -163,7 +163,7 @@ void RotatedFileLogger::rotate_file() {
|
||||
if (max_files > 1) {
|
||||
String timestamp = Time::get_singleton()->get_datetime_string_from_system().replace(":", ".");
|
||||
String backup_name = base_path.get_basename() + timestamp;
|
||||
if (base_path.get_extension() != String()) {
|
||||
if (!base_path.get_extension().is_empty()) {
|
||||
backup_name += "." + base_path.get_extension();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user