From 0e7738e488fa5205a92dc7b19a5c27fd3df570e3 Mon Sep 17 00:00:00 2001 From: "R. Quast" Date: Sun, 23 Jun 2024 08:31:52 +0200 Subject: [PATCH] Update readline.h --- src/main/cxx/core/readline.h | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/src/main/cxx/core/readline.h b/src/main/cxx/core/readline.h index f140a41..527e3e1 100644 --- a/src/main/cxx/core/readline.h +++ b/src/main/cxx/core/readline.h @@ -43,8 +43,11 @@ read (std::istream &is, std::vector &a, size_t n, bool append = false) { ta.push_back (aa); } + else + { + break; + } } - if (is) { if (append) @@ -97,8 +100,11 @@ read (std::istream &is, std::vector &a, std::vector &b, size_t n, ta.push_back (aa); tb.push_back (bb); } + else + { + break; + } } - if (is) { if (append) @@ -159,8 +165,11 @@ read (std::istream &is, std::vector &a, std::vector &b, tb.push_back (bb); tc.push_back (cc); } + else + { + break; + } } - if (is) { if (append) @@ -229,8 +238,11 @@ read (std::istream &is, std::vector &a, std::vector &b, tc.push_back (cc); td.push_back (dd); } + else + { + break; + } } - if (is) { if (append) @@ -308,8 +320,11 @@ read (std::istream &is, std::vector &a, std::vector &b, td.push_back (dd); te.push_back (ee); } + else + { + break; + } } - if (is) { if (append) @@ -388,7 +403,9 @@ read (std::istream &is, std::vector &a, std::vector &b, ist >> ss; if (!ist) - ss.erase (); + { + ss.erase (); + } ta.push_back (aa); tb.push_back (bb); @@ -396,6 +413,10 @@ read (std::istream &is, std::vector &a, std::vector &b, td.push_back (dd); ts.push_back (ss); } + else + { + break; + } } if (is)