From 004fb7893231fdd29aff26a499496500ee53b5ca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 30 Mar 2023 21:18:02 +0200 Subject: [PATCH] [PATCH] Stop using enum for integer constants in image sample This always wasn't the best and started to result in CI failures now as recent versions of gcc (e.g. 11.3 in Ubuntu 2.2.04) started giving -Wdeprecated-enum-float-conversion when using REAL_SIZE in the expressions. Gbp-Pq: Name 13ebaee247781b7cde1c830b36145aec9ab91127.patch --- samples/image/image.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/samples/image/image.cpp b/samples/image/image.cpp index eb65cd2..a0b638b 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -613,12 +613,9 @@ private: class MyRawBitmapFrame : public wxFrame { public: - enum - { - BORDER = 15, - SIZE = 150, - REAL_SIZE = SIZE - 2*BORDER - }; + static const int BORDER = 15; + static const int SIZE = 150; + static const int REAL_SIZE = SIZE - 2*BORDER; MyRawBitmapFrame(wxFrame *parent) : wxFrame(parent, wxID_ANY, "Raw bitmaps (how exciting)"), -- 2.30.2