diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-25 21:27:56 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-25 21:27:56 -0400 |
commit | 9dadaebfeb461ba795124281018d0f7eac200cf4 (patch) | |
tree | 941243868b1dcacd68cbd52a2f96e40bf70a5d3b /src/amount.cc | |
parent | f35bc939c96c3a3bf09c5881d638b5ba60449c03 (diff) | |
parent | e696bfd913a10edd19f9e35eb1aee2c97b11e7f6 (diff) | |
download | fork-ledger-9dadaebfeb461ba795124281018d0f7eac200cf4.tar.gz fork-ledger-9dadaebfeb461ba795124281018d0f7eac200cf4.tar.bz2 fork-ledger-9dadaebfeb461ba795124281018d0f7eac200cf4.zip |
Merge branch 'next'
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/amount.cc b/src/amount.cc index 2434f110..5aa985c8 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -623,9 +623,9 @@ namespace { "mpfr_print = " << buf << " (precision " << prec << ")"); if (zeros_prec >= 0) { - int index = std::strlen(buf); - int point = 0; - for (int i = 0; i < index; i++) { + string::size_type index = std::strlen(buf); + string::size_type point = 0; + for (string::size_type i = 0; i < index; i++) { if (buf[i] == '.') { point = i; break; @@ -837,7 +837,7 @@ namespace { READ_INTO(in, buf, 255, c, std::isdigit(c) || c == '-' || c == '.' || c == ','); - int len = std::strlen(buf); + string::size_type len = std::strlen(buf); while (len > 0 && ! std::isdigit(buf[len - 1])) { buf[--len] = '\0'; in.unget(); @@ -989,7 +989,7 @@ bool amount_t::parse(std::istream& in, const parse_flags_t& flags) // necessary. if (last_comma != string::npos || last_period != string::npos) { - int len = quant.length(); + string::size_type len = quant.length(); scoped_array<char> buf(new char[len + 1]); const char * p = quant.c_str(); char * t = buf.get(); |