diff --git a/SharedGraphics/Rect.cpp b/SharedGraphics/Rect.cpp index 6013dc6343..1f14918cd1 100644 --- a/SharedGraphics/Rect.cpp +++ b/SharedGraphics/Rect.cpp @@ -34,11 +34,11 @@ Rect Rect::united(const Rect& other) const return rect; } -Vector Rect::shatter(const Rect& hammer) const +Vector Rect::shatter(const Rect& hammer) const { - Vector pieces; + Vector pieces; if (!intersects(hammer)) { - pieces.append(*this); + pieces.unchecked_append(*this); return pieces; } Rect top_shard { @@ -66,13 +66,13 @@ Vector Rect::shatter(const Rect& hammer) const min((hammer.y() + hammer.height()), (y() + height())) - max(hammer.y(), y()) }; if (intersects(top_shard)) - pieces.append(top_shard); + pieces.unchecked_append(top_shard); if (intersects(bottom_shard)) - pieces.append(bottom_shard); + pieces.unchecked_append(bottom_shard); if (intersects(left_shard)) - pieces.append(left_shard); + pieces.unchecked_append(left_shard); if (intersects(right_shard)) - pieces.append(right_shard); + pieces.unchecked_append(right_shard); return pieces; } diff --git a/SharedGraphics/Rect.h b/SharedGraphics/Rect.h index 05695b6996..de600a4e77 100644 --- a/SharedGraphics/Rect.h +++ b/SharedGraphics/Rect.h @@ -177,7 +177,7 @@ public: Point location() const { return m_location; } Size size() const { return m_size; } - Vector shatter(const Rect& hammer) const; + Vector shatter(const Rect& hammer) const; operator WSAPI_Rect() const;