From a38ae68f09bb22c4f2a221f992157d7e13a394c1 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Fri, 20 Aug 2021 23:27:58 +0200 Subject: [PATCH] Remove Paint.cpp assertions Before the refactor, the assertion read like this: ``` assert(static_cast(bound_box_length_x) == static_cast(bound_box_length_x)); ``` which meant that bound_box_length_x = 0 was valid. The refactor (likely accidentally) changed this, which causes assertions to get hit within 2 seconds after opening on my machine. According to Duncan, the asserts are no longer necessary at all, so remove them altogether. --- src/openrct2/paint/Paint.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/openrct2/paint/Paint.cpp b/src/openrct2/paint/Paint.cpp index f4d9913b37..ae49f096eb 100644 --- a/src/openrct2/paint/Paint.cpp +++ b/src/openrct2/paint/Paint.cpp @@ -801,9 +801,6 @@ paint_struct* PaintAddImageAsParent( int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset, int32_t bound_box_offset_x, int32_t bound_box_offset_y, int32_t bound_box_offset_z) { - assert(bound_box_length_x > 0); - assert(bound_box_length_y > 0); - session->LastPS = nullptr; session->LastAttachedPS = nullptr; @@ -863,8 +860,6 @@ paint_struct* PaintAddImageAsChild( int32_t bound_box_length_y, int32_t bound_box_length_z, int32_t z_offset, int32_t bound_box_offset_x, int32_t bound_box_offset_y, int32_t bound_box_offset_z) { - assert(bound_box_length_x > 0); - assert(bound_box_length_y > 0); return PaintAddImageAsChild( session, image_id, { x_offset, y_offset, z_offset }, { bound_box_length_x, bound_box_length_y, bound_box_length_z }, { bound_box_offset_x, bound_box_offset_y, bound_box_offset_z });