From d456985f41a3a84e1f16341b1ff12c50b28e9bee Mon Sep 17 00:00:00 2001 From: Arjen Baart Date: Wed, 18 May 2011 18:26:29 +0200 Subject: [PATCH] Remove the trailing \r and trailing blanks from the description part of the bank mutations.. --- bank.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/bank.cpp b/bank.cpp index f81cd14..e3e693e 100644 --- a/bank.cpp +++ b/bank.cpp @@ -176,7 +176,6 @@ main(int argc, char *argv[]) exit(1); } - //read_templates("Bank.templ"); std::vector templates = read_templates("Bank.templ"); read_mutations(argv[optind], templates); @@ -204,7 +203,6 @@ std::vector read_templates(const char * filename) } first = false; - //line <<= 1; int separator = line.index('~'); bt = BankTemplate(line[0] == '+', line(1, separator -1), line(separator + 1, ~line - separator -1)); } @@ -233,17 +231,22 @@ void read_mutations(const char *filename, std::vector templates) { String description; - //std::cout << line << "\n"; line += ",\"\""; bank_record = parse_csv(line, ','); - //std::cout << " " << bank_record[BOOKING_DATE] << " " <>= 1; + while (description[~description - 1] == ' ') + { + description >>= 1; + } // Find a template for this bank record -- 2.11.0