You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Rename empty() to is_empty()
This commit is contained in:
@@ -371,8 +371,8 @@ Ref<Image> StreamTexture2D::load_image_from_file(FileAccess *f, int p_size_limit
|
||||
img = Image::lossy_unpacker(pv);
|
||||
}
|
||||
|
||||
if (img.is_null() || img->empty()) {
|
||||
ERR_FAIL_COND_V(img.is_null() || img->empty(), Ref<Image>());
|
||||
if (img.is_null() || img->is_empty()) {
|
||||
ERR_FAIL_COND_V(img.is_null() || img->is_empty(), Ref<Image>());
|
||||
}
|
||||
|
||||
if (first) {
|
||||
@@ -548,7 +548,7 @@ Error StreamTexture2D::_load_data(const String &p_path, int &tw, int &th, int &t
|
||||
|
||||
memdelete(f);
|
||||
|
||||
if (image.is_null() || image->empty()) {
|
||||
if (image.is_null() || image->is_empty()) {
|
||||
return ERR_CANT_OPEN;
|
||||
}
|
||||
|
||||
@@ -924,7 +924,7 @@ Error StreamTexture3D::_load_data(const String &p_path, Vector<Ref<Image>> &r_da
|
||||
|
||||
for (int i = 0; i < (r_depth + mipmaps); i++) {
|
||||
Ref<Image> image = StreamTexture2D::load_image_from_file(f, 0);
|
||||
ERR_FAIL_COND_V(image.is_null() || image->empty(), ERR_CANT_OPEN);
|
||||
ERR_FAIL_COND_V(image.is_null() || image->is_empty(), ERR_CANT_OPEN);
|
||||
if (i == 0) {
|
||||
r_format = image->get_format();
|
||||
r_width = image->get_width();
|
||||
@@ -2223,7 +2223,7 @@ Error ImageTextureLayered::create_from_images(Vector<Ref<Image>> p_images) {
|
||||
"Cubemap array layers must be a multiple of 6");
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V(p_images[0].is_null() || p_images[0]->empty(), ERR_INVALID_PARAMETER);
|
||||
ERR_FAIL_COND_V(p_images[0].is_null() || p_images[0]->is_empty(), ERR_INVALID_PARAMETER);
|
||||
|
||||
Image::Format new_format = p_images[0]->get_format();
|
||||
int new_width = p_images[0]->get_width();
|
||||
@@ -2361,7 +2361,7 @@ Error StreamTextureLayered::_load_data(const String &p_path, Vector<Ref<Image>>
|
||||
|
||||
for (uint32_t i = 0; i < layer_count; i++) {
|
||||
Ref<Image> image = StreamTexture2D::load_image_from_file(f, p_size_limit);
|
||||
ERR_FAIL_COND_V(image.is_null() || image->empty(), ERR_CANT_OPEN);
|
||||
ERR_FAIL_COND_V(image.is_null() || image->is_empty(), ERR_CANT_OPEN);
|
||||
images.write[i] = image;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user