diff options
Diffstat (limited to 'extension/src/openvic-extension/classes')
-rw-r--r-- | extension/src/openvic-extension/classes/GFXMaskedFlagTexture.cpp | 7 | ||||
-rw-r--r-- | extension/src/openvic-extension/classes/GFXPieChartTexture.cpp | 7 |
2 files changed, 4 insertions, 10 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() { diff --git a/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp b/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp index e1bffc5..63deeda 100644 --- a/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp +++ b/extension/src/openvic-extension/classes/GFXPieChartTexture.cpp @@ -107,11 +107,8 @@ Ref<GFXPieChartTexture> GFXPieChartTexture::make_gfx_pie_chart_texture(GFX::PieC Ref<GFXPieChartTexture> pie_chart_texture; pie_chart_texture.instantiate(); ERR_FAIL_NULL_V(pie_chart_texture, nullptr); - if (pie_chart_texture->set_gfx_pie_chart(gfx_pie_chart) == OK) { - return pie_chart_texture; - } else { - return nullptr; - } + ERR_FAIL_COND_V(pie_chart_texture->set_gfx_pie_chart(gfx_pie_chart) != OK, nullptr); + return pie_chart_texture; } void GFXPieChartTexture::clear() { |