diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-25 04:35:19 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-25 05:01:39 -0400 |
commit | 588f2ef2f51d7bdf209820bfb244034863601939 (patch) | |
tree | 7a473de7c117bf71bb802398823826ca4dfbfdca /src/amount.cc | |
parent | dc66840dd745863c06ad6513f9f66d589bcc29d8 (diff) | |
download | fork-ledger-588f2ef2f51d7bdf209820bfb244034863601939.tar.gz fork-ledger-588f2ef2f51d7bdf209820bfb244034863601939.tar.bz2 fork-ledger-588f2ef2f51d7bdf209820bfb244034863601939.zip |
Fixed many compiler warnings from g++ 4.4
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(); |