Replace size() == 0 with is_empty().

This commit is contained in:
Yufeng Ying 2025-03-20 00:07:31 +08:00
parent c7ea8614d7
commit 4f4031a675
147 changed files with 300 additions and 300 deletions

View file

@ -802,7 +802,7 @@ Vector<String> EditorFileSystem::_get_import_dest_paths(const String &p_path) {
}
bool EditorFileSystem::_scan_import_support(const Vector<String> &reimports) {
if (import_support_queries.size() == 0) {
if (import_support_queries.is_empty()) {
return false;
}
HashMap<String, int> import_support_test;
@ -818,7 +818,7 @@ bool EditorFileSystem::_scan_import_support(const Vector<String> &reimports) {
}
}
if (import_support_test.size() == 0) {
if (import_support_test.is_empty()) {
return false; //well nothing to do
}
@ -1858,7 +1858,7 @@ bool EditorFileSystem::_find_file(const String &p_file, EditorFileSystemDirector
Vector<String> path = f.split("/");
if (path.size() == 0) {
if (path.is_empty()) {
return false;
}
String file = path[path.size() - 1];
@ -1991,7 +1991,7 @@ EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String &p
Vector<String> path = f.split("/");
if (path.size() == 0) {
if (path.is_empty()) {
return nullptr;
}