From 24303bfdd3c6c926fa9a913eff6a394898814d81 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Tue, 19 Apr 2022 06:53:34 +0200 Subject: [PATCH] wxwidgets.cfg: Fixed FPs due to wrong direction attribute set for wxString::ToDouble and wxString::ToCDouble(). --- cfg/wxwidgets.cfg | 2 +- test/cfg/wxwidgets.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index 71ea0ce13..67e0dda50 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -9173,7 +9173,7 @@ - + diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp index d69e6c3fe..70c4bb253 100644 --- a/test/cfg/wxwidgets.cpp +++ b/test/cfg/wxwidgets.cpp @@ -42,6 +42,24 @@ bool duplicateBreak_wxLogApiError(const wxString &msg, const HRESULT &hr, wxStri } #endif +void argDirection_wxString_ToDouble(const wxString &str) +{ + // No warning is expected. Ensure both arguments are treated + // as output by library configuration + double value; + const bool convOk = str.ToDouble(&value); + if(convOk && value <= 42.0){} +} + +void argDirection_wxString_ToCDouble(const wxString &str) +{ + // No warning is expected. Ensure both arguments are treated + // as output by library configuration + double value; + const bool convOk = str.ToCDouble(&value); + if(convOk && value <= 42.0){} +} + void argDirection_wxTextCtrl_GetSelection(const wxTextCtrl *const textCtrl) { // No warning is expected. Ensure both arguments are treated