From 37759e07c973e9afc3b61b707a38f59586872f37 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 25 Mar 2024 19:26:25 +0100 Subject: [PATCH] wxwidgets.cfg: Added support for wxImage and wxIcon --- cfg/wxwidgets.cfg | 2 ++ test/cfg/wxwidgets.cpp | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index f5f1d9a6d17..2a2dbb791f4 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -20,6 +20,8 @@ wxFont wxFontInfo wxFontList + wxIcon + wxImage wxPen wxPenList wxPoint diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp index ca862ad44d1..4f0c00ad74e 100644 --- a/test/cfg/wxwidgets.cpp +++ b/test/cfg/wxwidgets.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,30 @@ #include #include +void unreadVariable_wxIcon(const wxIcon &icon, const char bits[], const int x, const char *const *ptr) +{ + // cppcheck-suppress unusedVariable + wxIcon a; + // cppcheck-suppress unreadVariable + wxIcon b(icon); + // cppcheck-suppress unreadVariable + wxImage c(bits, x, x); + // cppcheck-suppress unreadVariable + wxImage d(ptr); +} + +void unreadVariable_wxImage(const wxImage &image, const int x) +{ + // cppcheck-suppress unusedVariable + wxImage a; + // cppcheck-suppress unreadVariable + wxImage b(image); + // cppcheck-suppress unreadVariable + wxImage c(x, x); + // cppcheck-suppress unreadVariable + wxImage d(x, x, true); +} + void unreadVariable_wxUString(const wxUString &str, const wxChar32 *strPtr) { // cppcheck-suppress unusedVariable