From 0aaf8a964e2d9fbcab783e16727d6314f199f520 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 22 Feb 2026 19:08:29 +0100 Subject: [PATCH] Make wxSizerItem::GetRect() const There is really no reason for it not to be. There also doesn't seem to be any reason for it to be virtual, but keep this just to warn any people who override it in their code so that they could add "const". --- include/wx/sizer.h | 2 +- interface/wx/sizer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/sizer.h b/include/wx/sizer.h index 90d07ae3e7..80114a4abf 100644 --- a/include/wx/sizer.h +++ b/include/wx/sizer.h @@ -374,7 +374,7 @@ public: float GetRatio() const { return m_ratio; } - virtual wxRect GetRect() { return m_rect; } + virtual wxRect GetRect() const { return m_rect; } // set a sizer item id (different from a window id, all sizer items, // including spacers, can have an associated id) diff --git a/interface/wx/sizer.h b/interface/wx/sizer.h index 2f5b3664ad..255c784383 100644 --- a/interface/wx/sizer.h +++ b/interface/wx/sizer.h @@ -1306,7 +1306,7 @@ public: /** Get the rectangle of the item on the parent window, excluding borders. */ - virtual wxRect GetRect(); + virtual wxRect GetRect() const; /** Get the current size of the item, as set in the last Layout.