diff options
-rw-r--r-- | src/account.cc | 4 | ||||
-rw-r--r-- | src/item.cc | 2 | ||||
-rw-r--r-- | src/post.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/account.cc b/src/account.cc index 5f9f7f51..7ce62fd1 100644 --- a/src/account.cc +++ b/src/account.cc @@ -306,7 +306,7 @@ namespace { } value_t get_addr(account_t& account) { - return long(&account); + return long(reinterpret_cast<intptr_t>(&account)); } value_t get_depth_parent(account_t& account) @@ -770,7 +770,7 @@ void put_account(property_tree::ptree& st, const account_t& acct, std::ostringstream buf; buf.width(sizeof(unsigned long) * 2); buf.fill('0'); - buf << std::hex << reinterpret_cast<unsigned long>(&acct); + buf << std::hex << reinterpret_cast<intptr_t>(&acct); st.put("<xmlattr>.id", buf.str()); diff --git a/src/item.cc b/src/item.cc index d46fba8b..06d77c66 100644 --- a/src/item.cc +++ b/src/item.cc @@ -369,7 +369,7 @@ namespace { } value_t get_addr(item_t& item) { - return long(&item); + return long(reinterpret_cast<intptr_t>(&item)); } value_t get_depth(item_t&) { diff --git a/src/post.cc b/src/post.cc index 9cc0594b..c9f28e99 100644 --- a/src/post.cc +++ b/src/post.cc @@ -729,7 +729,7 @@ void put_post(property_tree::ptree& st, const post_t& post) std::ostringstream buf; buf.width(sizeof(unsigned long) * 2); buf.fill('0'); - buf << std::hex << reinterpret_cast<unsigned long>(post.account); + buf << std::hex << reinterpret_cast<intptr_t>(post.account); t.put("<xmlattr>.ref", buf.str()); t.put("name", post.account->fullname()); |