From 8a27fa9c617533e76673ce61a65e2ba869b52208 Mon Sep 17 00:00:00 2001 From: B Stack Date: Mon, 31 Aug 2020 20:07:13 -0400 Subject: add upstream 11.1 --- wx+/choice_enum.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wx+/choice_enum.h') diff --git a/wx+/choice_enum.h b/wx+/choice_enum.h index e11b9991..626aa39a 100644 --- a/wx+/choice_enum.h +++ b/wx+/choice_enum.h @@ -104,7 +104,7 @@ Enum getEnumVal(const EnumDescrList& mapping, const wxChoice& ctrl) { const int selectedPos = ctrl.GetSelection(); - if (0 <= selectedPos && selectedPos < static_cast(mapping.descrList.size())) + if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) return mapping.descrList[selectedPos].first; else { @@ -117,7 +117,7 @@ template void updateTooltipEnumVal(const EnumDescrList& mappi { const int selectedPos = ctrl.GetSelection(); - if (0 <= selectedPos && selectedPos < static_cast(mapping.descrList.size())) + if (0 <= selectedPos && selectedPos < std::ssize(mapping.descrList)) { if (const auto& [text, tooltip] = mapping.descrList[selectedPos].second; !tooltip.empty()) -- cgit