diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-17 14:27:11 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-17 15:06:04 -0600 |
commit | cc40beca462626a806518bb399cfa777c2fcef8f (patch) | |
tree | a6b55d2b9c9495b393e396f420983923156d0a1f /src/csv.cc | |
parent | cf4a665a0e9f630c3ed5400d1114fcc297194da1 (diff) | |
download | fork-ledger-cc40beca462626a806518bb399cfa777c2fcef8f.tar.gz fork-ledger-cc40beca462626a806518bb399cfa777c2fcef8f.tar.bz2 fork-ledger-cc40beca462626a806518bb399cfa777c2fcef8f.zip |
Fixes for variable shadowing (7/28)
Diffstat (limited to 'src/csv.cc')
-rw-r--r-- | src/csv.cc | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -40,27 +40,27 @@ namespace ledger { -string csv_reader::read_field(std::istream& in) +string csv_reader::read_field(std::istream& sin) { string field; char c; - if (in.peek() == '"' || in.peek() == '|') { - in.get(c); + if (sin.peek() == '"' || sin.peek() == '|') { + sin.get(c); char x; - while (in.good() && ! in.eof()) { - in.get(x); + while (sin.good() && ! sin.eof()) { + sin.get(x); if (x == '\\') { - in.get(x); + sin.get(x); } - else if (x == '"' && in.peek() == '"') { - in.get(x); + else if (x == '"' && sin.peek() == '"') { + sin.get(x); } else if (x == c) { if (x == '|') - in.unget(); - else if (in.peek() == ',') - in.get(c); + sin.unget(); + else if (sin.peek() == ',') + sin.get(c); break; } if (x != '\0') @@ -68,8 +68,8 @@ string csv_reader::read_field(std::istream& in) } } else { - while (in.good() && ! in.eof()) { - in.get(c); + while (sin.good() && ! sin.eof()) { + sin.get(c); if (c == ',') break; if (c != '\0') |