3535
3636#define LINE_GRAB_WIDTH 8
3737
38- #ifdef TOOLS_ENABLED
38+ #ifdef DEBUG_ENABLED
3939Rect2 OccluderPolygon2D::_edit_get_rect () const {
4040 if (rect_cache_dirty) {
4141 if (closed) {
@@ -83,7 +83,7 @@ bool OccluderPolygon2D::_edit_is_selected_on_click(const Point2 &p_point, double
8383 return false ;
8484 }
8585}
86- #endif
86+ #endif // DEBUG_ENABLED
8787
8888void OccluderPolygon2D::set_polygon (const Vector<Vector2> &p_polygon) {
8989 polygon = p_polygon;
@@ -156,7 +156,7 @@ OccluderPolygon2D::~OccluderPolygon2D() {
156156void LightOccluder2D::_poly_changed () {
157157#ifdef DEBUG_ENABLED
158158 queue_redraw ();
159- #endif
159+ #endif // DEBUG_ENABLED
160160}
161161
162162void LightOccluder2D::_physics_interpolated_changed () {
@@ -218,22 +218,22 @@ void LightOccluder2D::_notification(int p_what) {
218218 }
219219}
220220
221- #ifdef TOOLS_ENABLED
221+ #ifdef DEBUG_ENABLED
222222Rect2 LightOccluder2D::_edit_get_rect () const {
223223 return occluder_polygon.is_valid () ? occluder_polygon->_edit_get_rect () : Rect2 ();
224224}
225225
226226bool LightOccluder2D::_edit_is_selected_on_click (const Point2 &p_point, double p_tolerance) const {
227227 return occluder_polygon.is_valid () ? occluder_polygon->_edit_is_selected_on_click (p_point, p_tolerance) : false ;
228228}
229- #endif
229+ #endif // DEBUG_ENABLED
230230
231231void LightOccluder2D::set_occluder_polygon (const Ref<OccluderPolygon2D> &p_polygon) {
232232#ifdef DEBUG_ENABLED
233233 if (occluder_polygon.is_valid ()) {
234234 occluder_polygon->disconnect_changed (callable_mp (this , &LightOccluder2D::_poly_changed));
235235 }
236- #endif
236+ #endif // DEBUG_ENABLED
237237 occluder_polygon = p_polygon;
238238
239239 if (occluder_polygon.is_valid ()) {
@@ -247,7 +247,7 @@ void LightOccluder2D::set_occluder_polygon(const Ref<OccluderPolygon2D> &p_polyg
247247 occluder_polygon->connect_changed (callable_mp (this , &LightOccluder2D::_poly_changed));
248248 }
249249 queue_redraw ();
250- #endif
250+ #endif // DEBUG_ENABLED
251251}
252252
253253Ref<OccluderPolygon2D> LightOccluder2D::get_occluder_polygon () const {
0 commit comments