summaryrefslogtreecommitdiff
path: root/src/py_journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-02-17 15:17:52 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-02-17 15:17:52 -0600
commitc3a9a7d2c584a7651426b3516f4e9991c8063e02 (patch)
tree6a7748588d90d3d9e0032903548b3411d7277dd6 /src/py_journal.cc
parentc6b51a2635bdf7da803dd2fc8251d6c290f134a4 (diff)
downloadfork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.tar.gz
fork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.tar.bz2
fork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.zip
Fixed many Clang type conversion warnings with static_cast
Diffstat (limited to 'src/py_journal.cc')
-rw-r--r--src/py_journal.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/py_journal.cc b/src/py_journal.cc
index 5eac9eb0..bd781225 100644
--- a/src/py_journal.cc
+++ b/src/py_journal.cc
@@ -56,7 +56,7 @@ namespace {
long xacts_len(journal_t& journal)
{
- return journal.xacts.size();
+ return static_cast<long>(journal.xacts.size());
}
#if 0
@@ -66,7 +66,7 @@ namespace {
static journal_t * last_journal = NULL;
static xacts_list::iterator elem;
- long len = journal.xacts.size();
+ long len = static_cast<long>(journal.xacts.size());
if (labs(i) >= len) {
PyErr_SetString(PyExc_IndexError, _("Index out of range"));
@@ -91,7 +91,7 @@ namespace {
long accounts_len(account_t& account)
{
- return account.accounts.size();
+ return static_cast<long>(account.accounts.size());
}
account_t& accounts_getitem(account_t& account, long i)
@@ -100,7 +100,7 @@ namespace {
static account_t * last_account = NULL;
static accounts_map::iterator elem;
- long len = account.accounts.size();
+ long len = static_cast<long>(account.accounts.size());
if (labs(i) >= len) {
PyErr_SetString(PyExc_IndexError, _("Index out of range"));
@@ -210,7 +210,8 @@ namespace {
post_t * posts_getitem(collector_wrapper& collector, long i)
{
- post_t * post = collector.posts_collector->posts[i];
+ post_t * post =
+ collector.posts_collector->posts[static_cast<std::string::size_type>(i)];
std::cerr << typeid(post).name() << std::endl;
std::cerr << typeid(*post).name() << std::endl;
std::cerr << typeid(post->account).name() << std::endl;