From 7f39b30e40f1b186673b98dfb3682ff6d91b9633 Mon Sep 17 00:00:00 2001 From: bjmt Date: Sat, 27 Apr 2019 20:13:01 -0400 Subject: [PATCH] countfa v1.1 --- ChangeLog | 1 + src/countfa.cpp | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index fcb3085..029ac44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ sequence in memory * countlets has a new -a option, allowing to specify alphabet to prevent loading entire sequence into memory (at the cost of speed for higher k) * countlets version bumped to v1.1 +* countfa now reads one char at a time, version bumped to v1.1 2019-04-26 Benjamin Jean-Marie Tremblay diff --git a/src/countfa.cpp b/src/countfa.cpp index 3f0fd70..42dbeb7 100644 --- a/src/countfa.cpp +++ b/src/countfa.cpp @@ -26,7 +26,7 @@ using namespace std; void usage() { printf( - "countfa v1.0 Copyright (C) 2019 Benjamin Jean-Marie Tremblay \n" + "countfa v1.1 Copyright (C) 2019 Benjamin Jean-Marie Tremblay \n" " \n" "Usage: coutfa -i [filename] \n" " cat [filename] | coutfa \n" @@ -57,9 +57,7 @@ void do_countfa(istream &input) { } if (at_name) cout << l; - else { - if (l != ' ' && l != '\n') ++counter; - } + else if (l != ' ' && l != '\n') ++counter; }