From f72b1c2f1308226502b849dfbe4e3ddd476958fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Wed, 8 Apr 2026 10:43:44 -0300 Subject: [PATCH] Fix failing build with mingw. --- src/eepp/ui/uinode.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/eepp/ui/uinode.cpp b/src/eepp/ui/uinode.cpp index d1e3cf4d5..574dc7bee 100644 --- a/src/eepp/ui/uinode.cpp +++ b/src/eepp/ui/uinode.cpp @@ -1638,13 +1638,14 @@ Float UINode::lengthFromValue( const StyleSheetProperty& property, return convertLength( length, 0 ); } - static constexpr const std::initializer_list FontSizeNames = { + static constexpr std::string_view FontSizeNames[] = { "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large", "smaller", "larger" }; - std::initializer_list::iterator it = FontSizeNames.end(); - if ( ( it = std::find( FontSizeNames.begin(), FontSizeNames.end(), - property.getValue() ) ) != FontSizeNames.end() ) { + auto it = std::find( std::begin( FontSizeNames ), std::end( FontSizeNames ), + property.getValue() ); + + if ( it != std::end( FontSizeNames ) ) { std::string_view keyword = *it; StyleSheetLength res; if ( keyword == "xx-small" ) {