You've already forked godot
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user