diff options
author | hop311 <hop3114@gmail.com> | 2023-12-28 21:19:12 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-12-28 21:22:27 +0100 |
commit | d04d0247479b229407048a37cd0ad60933aa3bf1 (patch) | |
tree | cb3671592c2d1e7697371510f455de7e99f75a12 /extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp | |
parent | c21e9b7a529aebcf0148a6671377c3e8478fafdf (diff) |
Use `ERR_FAIL_*` macros where possible
Diffstat (limited to 'extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp')
-rw-r--r-- | extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp b/extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp index 0ed7755..424be33 100644 --- a/extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp +++ b/extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp @@ -76,11 +76,8 @@ Ref<GFXMaskedFlagTexture> GFXMaskedFlagTexture::make_gfx_masked_flag_texture(GFX Ref<GFXMaskedFlagTexture> masked_flag_texture; masked_flag_texture.instantiate(); ERR_FAIL_NULL_V(masked_flag_texture, nullptr); - if (masked_flag_texture->set_gfx_masked_flag(gfx_masked_flag) == OK) { - return masked_flag_texture; - } else { - return nullptr; - } + ERR_FAIL_COND_V(masked_flag_texture->set_gfx_masked_flag(gfx_masked_flag) != OK, nullptr); + return masked_flag_texture; } void GFXMaskedFlagTexture::clear() { |