Fix #8919: Release builds with asserts enabled (#8925)

This commit is contained in:
Charles Pigott
2021-04-01 23:57:49 +01:00
committed by GitHub
parent 2a9825b8de
commit dd798d688b
8 changed files with 17 additions and 17 deletions

View File

@@ -1156,7 +1156,7 @@ void NWidgetHorizontal::SetupSmallestSize(Window *w, bool init_array)
this->smallest_y = std::max(this->smallest_y, child_wid->smallest_y + child_wid->padding_top + child_wid->padding_bottom);
}
/* 1b. Make the container higher if needed to accommodate all children nicely. */
#ifndef NDEBUG
#ifdef WITH_ASSERT
uint max_smallest = this->smallest_y + 3 * max_vert_fill; // Upper limit to computing smallest height.
#endif
uint cur_height = this->smallest_y;
@@ -1323,7 +1323,7 @@ void NWidgetVertical::SetupSmallestSize(Window *w, bool init_array)
this->smallest_x = std::max(this->smallest_x, child_wid->smallest_x + child_wid->padding_left + child_wid->padding_right);
}
/* 1b. Make the container wider if needed to accommodate all children nicely. */
#ifndef NDEBUG
#ifdef WITH_ASSERT
uint max_smallest = this->smallest_x + 3 * max_hor_fill; // Upper limit to computing smallest height.
#endif
uint cur_width = this->smallest_x;