From f36a2870b84c385b122060a3b109795464b36803 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Fri, 30 Nov 2018 05:47:31 -0500 Subject: [PATCH] Simplify re: lenormf --- src/ncurses_ui.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index b93f8309..be433ab5 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -670,14 +670,14 @@ Optional NCursesUI::get_next_key() case '1': { const Codepoint c2 = wgetch(m_window); - if ( c2 != ';' ) + if (c2 != ';') { ungetch(c2); ungetch(c1); break; } const Codepoint c3 = wgetch(m_window); - function f = nullptr; + function f; switch (c3) { case '2': f = shift; break; @@ -688,7 +688,7 @@ Optional NCursesUI::get_next_key() case '7': f = alt_ctrl; break; case '8': f = shift_alt_ctrl; break; } - if ( f == nullptr ) + if (f) { ungetch(c3); ungetch(c2); ungetch(c1); break;