From 4295ed85de7265657245c41314c03439caa12c51 Mon Sep 17 00:00:00 2001 From: Matuush Date: Tue, 22 Apr 2025 08:53:54 +0200 Subject: [PATCH] Simplify number input checking --- main.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/main.cpp b/main.cpp index f73177a..c209c45 100644 --- a/main.cpp +++ b/main.cpp @@ -135,10 +135,6 @@ count_type get_number(string prompt) { ch = getch(); } - // Check if input is a number - for(int i = 0; i < s.size(); i++) - if(s[i] < '0' || s[i] > '9') - return file_offset + cur.r; if(s.size() == 0) return file_offset + cur.r;