From 67119fbdebea1fc025d0ba20f52f0aa2255db39e Mon Sep 17 00:00:00 2001 From: Vlasov Vitaly Date: Fri, 6 Dec 2013 23:17:38 +0400 Subject: [PATCH] make if condition shorter --- src/output.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/output.cpp b/src/output.cpp index 228d38d150fb2..b4ad50113fa77 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -564,8 +564,7 @@ std::string string_input_win(WINDOW *w, std::string input, int max_length, int s ret.append(tmp); } } else if( ch != 0 && ch != ERR && (ret.size() < max_length || max_length == 0) ) { - if (only_digits && (ch != '0' && ch != '1' && ch != '2' && ch != '3' && ch != '4' && ch != '5' - && ch != '6' && ch != '7' && ch != '8' && ch != '9')) { + if ( only_digits && !isdigit(ch) ) { return_key = true; } else { if ( pos == ret.size() ) {