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

@ -1080,7 +1080,7 @@ Error FBXDocument::_parse_images(Ref<FBXState> p_state, const String &p_base_pat
}
// Fallback to loading as byte array.
data = FileAccess::get_file_as_bytes(path);
if (data.size() == 0) {
if (data.is_empty()) {
WARN_PRINT(vformat("FBX: Image index '%d' couldn't be loaded from path: %s because there was no data to load. Skipping it.", texture_i, path));
p_state->images.push_back(Ref<Texture2D>()); // Placeholder to keep count.
p_state->source_images.push_back(Ref<Image>());