diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-09 17:04:18 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-25 18:45:30 +0200 |
commit | fdd3d36c6d09923f4e458d4526a7b968e7e026d8 (patch) | |
tree | d6eb7281c6af0748f77ed81e16d410afcaa9cf9a /servers/rendering/dummy/storage/texture_storage.h | |
parent | 82f6e9be5ea06bfef1adb315f15a409939b4a100 (diff) | |
download | redot-engine-fdd3d36c6d09923f4e458d4526a7b968e7e026d8.tar.gz |
[Servers] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'servers/rendering/dummy/storage/texture_storage.h')
-rw-r--r-- | servers/rendering/dummy/storage/texture_storage.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/dummy/storage/texture_storage.h b/servers/rendering/dummy/storage/texture_storage.h index d9bde5903c..2a72547810 100644 --- a/servers/rendering/dummy/storage/texture_storage.h +++ b/servers/rendering/dummy/storage/texture_storage.h @@ -73,21 +73,21 @@ public: virtual RID texture_allocate() override { DummyTexture *texture = memnew(DummyTexture); - ERR_FAIL_COND_V(!texture, RID()); + ERR_FAIL_NULL_V(texture, RID()); return texture_owner.make_rid(texture); }; virtual void texture_free(RID p_rid) override { // delete the texture DummyTexture *texture = texture_owner.get_or_null(p_rid); - ERR_FAIL_COND(!texture); + ERR_FAIL_NULL(texture); texture_owner.free(p_rid); memdelete(texture); }; virtual void texture_2d_initialize(RID p_texture, const Ref<Image> &p_image) override { DummyTexture *t = texture_owner.get_or_null(p_texture); - ERR_FAIL_COND(!t); + ERR_FAIL_NULL(t); t->image = p_image->duplicate(); }; virtual void texture_2d_layered_initialize(RID p_texture, const Vector<Ref<Image>> &p_layers, RS::TextureLayeredType p_layered_type) override{}; @@ -105,7 +105,7 @@ public: virtual Ref<Image> texture_2d_get(RID p_texture) const override { DummyTexture *t = texture_owner.get_or_null(p_texture); - ERR_FAIL_COND_V(!t, Ref<Image>()); + ERR_FAIL_NULL_V(t, Ref<Image>()); return t->image; }; virtual Ref<Image> texture_2d_layer_get(RID p_texture, int p_layer) const override { return Ref<Image>(); }; |