diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-28 04:54:54 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-28 04:54:54 -0400 |
commit | 38122c22241cb8fe64f0d17cd3b084418f49edaa (patch) | |
tree | 9383f2082602f2d71dde5328fa8bcf3f6609a5b7 /src/token.cc | |
parent | fb129fa7a1b293d3a04513aee3ca4a489f094754 (diff) | |
download | fork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.tar.gz fork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.tar.bz2 fork-ledger-38122c22241cb8fe64f0d17cd3b084418f49edaa.zip |
Corrected warnings g++-4.3.3 was complaining about
Diffstat (limited to 'src/token.cc')
-rw-r--r-- | src/token.cc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/token.cc b/src/token.cc index 3e14fbaf..6935bc7a 100644 --- a/src/token.cc +++ b/src/token.cc @@ -36,7 +36,7 @@ namespace ledger { int expr_t::token_t::parse_reserved_word(std::istream& in) { - char c = in.peek(); + char c = static_cast<char>(in.peek()); if (c == 'a' || c == 'd' || c == 'f' || c == 'o' || c == 'n' || c == 't') { length = 0; @@ -141,7 +141,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) switch (c) { case '&': in.get(c); - c = in.peek(); + c = static_cast<char>(in.peek()); if (c == '&') { in.get(c); kind = KW_AND; @@ -152,7 +152,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) break; case '|': in.get(c); - c = in.peek(); + c = static_cast<char>(in.peek()); if (c == '|') { in.get(c); kind = KW_OR; @@ -218,7 +218,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) case '!': in.get(c); - c = in.peek(); + c = static_cast<char>(in.peek()); if (c == '=') { in.get(c); symbol[1] = c; @@ -258,7 +258,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) break; case ':': in.get(c); - c = in.peek(); + c = static_cast<char>(in.peek()); if (c == '=') { in.get(c); symbol[1] = c; @@ -291,7 +291,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) case '=': in.get(c); - c = in.peek(); + c = static_cast<char>(in.peek()); if (c == '~') { in.get(c); symbol[1] = c; @@ -313,7 +313,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) case '<': in.get(c); - if (in.peek() == '=') { + if (static_cast<char>(in.peek()) == '=') { in.get(c); symbol[1] = c; symbol[2] = '\0'; @@ -326,7 +326,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) case '>': in.get(c); - if (in.peek() == '=') { + if (static_cast<char>(in.peek()) == '=') { in.get(c); symbol[1] = c; symbol[2] = '\0'; @@ -387,7 +387,7 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) if (in.fail()) throw_(parse_error, _("Failed to reset input stream")); - c = in.peek(); + c = static_cast<char>(in.peek()); if (std::isdigit(c) || c == '.') expected('\0', c); @@ -395,12 +395,12 @@ void expr_t::token_t::next(std::istream& in, const uint_least8_t pflags) } else { kind = VALUE; value = temp; - length = in.tellg() - pos; + length = static_cast<std::size_t>(in.tellg() - pos); } } catch (const std::exception& err) { kind = ERROR; - length = in.tellg() - pos; + length = static_cast<std::size_t>(in.tellg() - pos); throw; } break; |