Skip to content

Commit f4a355d

Browse files
committed
we don't need a lambda
1 parent 1bbdd4e commit f4a355d

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/cascadia/TerminalCore/Terminal.cpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,13 @@ void Terminal::UpdateAppearance(const ICoreAppearance& appearance)
141141
renderSettings.SetRenderMode(RenderSettings::Mode::IntenseIsBold, appearance.IntenseIsBold());
142142
renderSettings.SetRenderMode(RenderSettings::Mode::IntenseIsBright, appearance.IntenseIsBright());
143143

144-
// If we're in high contrast mode and AIC is set to Automatic Indexed/Always,
145-
// fallback to Indexed/Always respectively.
146-
const auto deducedAIC = [this, &appearance]() {
147-
const auto initialAIC = appearance.AdjustIndistinguishableColors();
148-
switch (initialAIC)
149-
{
150-
case AdjustTextMode::Automatic:
151-
return _highContrastMode ? AdjustTextMode::Indexed : AdjustTextMode::Never;
152-
default:
153-
return initialAIC;
154-
}
155-
}();
144+
// If AIC is set to Automatic,
145+
// update the value based on if high contrast mode is enabled.
146+
AdjustTextMode deducedAIC = appearance.AdjustIndistinguishableColors();
147+
if (deducedAIC == AdjustTextMode::Automatic)
148+
{
149+
deducedAIC = _highContrastMode ? AdjustTextMode::Indexed : AdjustTextMode::Never;
150+
}
156151

157152
switch (deducedAIC)
158153
{

0 commit comments

Comments
 (0)