From 878a41d3be13da2a654df74f2a35ea8b295c8a13 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 16 Oct 2018 17:33:51 -0400 Subject: 10.5 --- wx+/choice_enum.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wx+/choice_enum.h') diff --git a/wx+/choice_enum.h b/wx+/choice_enum.h index 2c424b9f..f2c93927 100755 --- a/wx+/choice_enum.h +++ b/wx+/choice_enum.h @@ -103,11 +103,11 @@ Enum getEnumVal(const EnumDescrList& mapping, const wxChoice& ctrl) template void updateTooltipEnumVal(const EnumDescrList& mapping, wxChoice& ctrl) { - const Enum value = getEnumVal(mapping, ctrl); + const Enum currentValue = getEnumVal(mapping, ctrl); - for (const auto& item : mapping.descrList) - if (item.first == value) - ctrl.SetToolTip(item.second.second); + for (const auto& [enumValue, textAndTooltip] : mapping.descrList) + if (currentValue == enumValue) + ctrl.SetToolTip(textAndTooltip.second); } } -- cgit