1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Simplify GDVIRTUAL_REQUIRED_CALL calls

This commit is contained in:
kobewi
2022-11-30 16:40:50 +01:00
parent cd491c6e47
commit 9a3960daa5
8 changed files with 124 additions and 233 deletions

View File

@@ -35,11 +35,9 @@
#include <limits.h>
float StyleBox::get_style_margin(Side p_side) const {
float ret;
if (GDVIRTUAL_REQUIRED_CALL(_get_style_margin, p_side, ret)) {
return ret;
}
return 0;
float ret = 0;
GDVIRTUAL_REQUIRED_CALL(_get_style_margin, p_side, ret);
return ret;
}
bool StyleBox::test_mask(const Point2 &p_point, const Rect2 &p_rect) const {
@@ -49,9 +47,7 @@ bool StyleBox::test_mask(const Point2 &p_point, const Rect2 &p_rect) const {
}
void StyleBox::draw(RID p_canvas_item, const Rect2 &p_rect) const {
if (GDVIRTUAL_REQUIRED_CALL(_draw, p_canvas_item, p_rect)) {
return;
}
GDVIRTUAL_REQUIRED_CALL(_draw, p_canvas_item, p_rect);
}
void StyleBox::set_default_margin(Side p_side, float p_value) {