From 34119e1c5fcdfff2b060f6b5374848ed0efd672b Mon Sep 17 00:00:00 2001 From: CodingJellyfish Date: Sun, 21 Apr 2024 14:40:10 +0800 Subject: [PATCH] Remove unneeded if in Widget::resize --- src/guiengine/widget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/guiengine/widget.cpp b/src/guiengine/widget.cpp index 1a0e149a5..dd66aa463 100644 --- a/src/guiengine/widget.cpp +++ b/src/guiengine/widget.cpp @@ -303,14 +303,15 @@ void Widget::resize() { assert(m_magic_number == 0xCAFEC001); - if (m_element) - moveIrrlichtElement(); + moveIrrlichtElement(); } // ----------------------------------------------------------------------------- void Widget::move(const int x, const int y, const int w, const int h) { + assert(m_magic_number == 0xCAFEC001); + m_x = x; m_y = y; m_w = w;