summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-28 04:54:54 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-28 04:54:54 -0400
commit38122c22241cb8fe64f0d17cd3b084418f49edaa (patch)
tree9383f2082602f2d71dde5328fa8bcf3f6609a5b7 /src/textual.cc
parentfb129fa7a1b293d3a04513aee3ca4a489f094754 (diff)
downloadfork-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/textual.cc')
-rw-r--r--src/textual.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/textual.cc b/src/textual.cc
index b3294d99..e3460202 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -919,7 +919,7 @@ post_t * instance_t::parse_post(char * line,
if (stream.eof()) {
next = NULL;
} else {
- next = skip_ws(next + stream.tellg());
+ next = skip_ws(next + static_cast<std::ptrdiff_t>(stream.tellg()));
// Parse the optional cost (@ PER-UNIT-COST, @@ TOTAL-COST)
@@ -967,7 +967,7 @@ post_t * instance_t::parse_post(char * line,
if (cstream.eof())
next = NULL;
else
- next = skip_ws(p + cstream.tellg());
+ next = skip_ws(p + static_cast<std::ptrdiff_t>(cstream.tellg()));
} else {
throw parse_error(_("Expected a cost amount"));
}
@@ -1056,7 +1056,7 @@ post_t * instance_t::parse_post(char * line,
if (stream.eof())
next = NULL;
else
- next = skip_ws(p + stream.tellg());
+ next = skip_ws(p + static_cast<std::ptrdiff_t>(stream.tellg()));
} else {
throw parse_error(_("Expected an assigned balance amount"));
}
@@ -1081,9 +1081,10 @@ post_t * instance_t::parse_post(char * line,
post->end_pos = curr_pos;
post->end_line = linenum;
- if (! tag_stack.empty())
+ if (! tag_stack.empty()) {
foreach (const string& tag, tag_stack)
post->parse_tags(tag.c_str());
+ }
TRACE_STOP(post_details, 1);
@@ -1240,9 +1241,10 @@ xact_t * instance_t::parse_xact(char * line,
xact->end_pos = curr_pos;
xact->end_line = linenum;
- if (! tag_stack.empty())
+ if (! tag_stack.empty()) {
foreach (const string& tag, tag_stack)
xact->parse_tags(tag.c_str());
+ }
TRACE_STOP(xact_details, 1);