From 6bc1e194badf936d428c539990b6a4f15bb1c686 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 18 Mar 2024 06:50:23 +0100 Subject: [PATCH] wxwidgets.cfg: Improved support for more data structures from wx (#6143) --- cfg/wxwidgets.cfg | 6 ++++ test/cfg/wxwidgets.cpp | 68 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index a7cd18e8038..dd42c600bd1 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -8,6 +8,12 @@ wxRealPoint wxVersionInfo wxRegion + wxRegEx + wxPosition + wxFileType + wxTimeSpan + wxDateSpan + wxAcceleratorEntry diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp index 25995f7f7ec..85e233cdf9a 100644 --- a/test/cfg/wxwidgets.cpp +++ b/test/cfg/wxwidgets.cpp @@ -8,6 +8,7 @@ // #include +#include #include #include #include @@ -19,9 +20,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -30,9 +33,72 @@ #include #include #include +#include #include -void unreadVariable(const wxCoord x, const wxPoint &pt, const wxRect &rect, const wxRegion ®ion, const wxBitmap &bmp) +void unreadVariable_wxAcceleratorEntry() +{ + // cppcheck-suppress unreadVariable + wxAcceleratorEntry a; +} + +void unreadVariable_wxDateSpan(const int x) +{ + // cppcheck-suppress unreadVariable + wxDateSpan a; + // cppcheck-suppress unreadVariable + wxDateSpan b{x}; + // cppcheck-suppress unreadVariable + wxDateSpan c{x, x}; + // cppcheck-suppress unreadVariable + wxDateSpan d{x, x, x}; + // cppcheck-suppress unreadVariable + wxDateSpan e{x, x, x, x}; +} + +void unreadVariable_wxTimeSpan(const long x, const wxLongLong y) +{ + // cppcheck-suppress unreadVariable + wxTimeSpan a; + // cppcheck-suppress unreadVariable + wxTimeSpan b{}; + // cppcheck-suppress unreadVariable + wxTimeSpan c{x}; + // cppcheck-suppress unreadVariable + wxTimeSpan d{x, x}; + // cppcheck-suppress unreadVariable + wxTimeSpan e{x, x, y}; + // cppcheck-suppress unreadVariable + wxTimeSpan f{x, x, y, y}; +} + +void unreadVariable_wxFileType(const wxFileTypeInfo &info) +{ + // cppcheck-suppress unreadVariable + wxFileType a(info); +} + +void unreadVariable_wxPosition(const int x) +{ + // cppcheck-suppress unreadVariable + wxPosition a; + // cppcheck-suppress unreadVariable + wxPosition b{}; + // cppcheck-suppress unreadVariable + wxPosition c{x,x}; +} + +void unreadVariable_wxRegEx(const wxString &expr, const int flags) +{ + // cppcheck-suppress unreadVariable + wxRegEx a; + // cppcheck-suppress unreadVariable + wxRegEx b{expr}; + // cppcheck-suppress unreadVariable + wxRegEx c{expr, flags}; +} + +void unreadVariable_wxRegion(const wxCoord x, const wxPoint &pt, const wxRect &rect, const wxRegion ®ion, const wxBitmap &bmp) { // cppcheck-suppress unreadVariable wxRegion a;