From a2379f4111a3b2d3e9e420d3f57c39486c3dcf30 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Fri, 24 Nov 2023 16:00:42 -0500 Subject: [PATCH] Altium QA: Fix issue with newer wx Now uses std::from_chars and + prefix must be stripped --- common/plugins/altium/altium_parser.cpp | 2 ++ qa/tests/common/plugins/altium/test_altium_parser.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/plugins/altium/altium_parser.cpp b/common/plugins/altium/altium_parser.cpp index 54363e1098..1ebb26f1c7 100644 --- a/common/plugins/altium/altium_parser.cpp +++ b/common/plugins/altium/altium_parser.cpp @@ -555,6 +555,8 @@ int32_t ALTIUM_PARSER::ReadKicadUnit( const std::map& aProps return 0; } + prefix.StartsWith( "+", &prefix ); + double mils; if( !prefix.ToCDouble( &mils ) ) diff --git a/qa/tests/common/plugins/altium/test_altium_parser.cpp b/qa/tests/common/plugins/altium/test_altium_parser.cpp index d724b57141..d7139c460b 100644 --- a/qa/tests/common/plugins/altium/test_altium_parser.cpp +++ b/qa/tests/common/plugins/altium/test_altium_parser.cpp @@ -193,7 +193,6 @@ static const std::vector read_kicad_unit_property = { { "100", 0 }, { "100mils", 0 }, // Incorrect prefix - { "+-100mil", 0 }, { "a100mil", 0 }, };