Use offsetof instead of custom macro

This commit is contained in:
Miha Čančula 2019-08-21 10:59:27 +02:00
parent 6aae360f00
commit 15290b8996
No known key found for this signature in database
GPG key ID: 4FC9D4BD4FBAB9B9

View file

@ -33,9 +33,6 @@
#include <algorithm>
#include <boost/multi_index/composite_key.hpp>
#define offset_d(i,f) (long(&(i)->f) - long(i))
#define offset_s(t,f) offset_d((t*)1000, f)
namespace graphene { namespace chain {
using namespace graphene::db;
@ -191,7 +188,7 @@ namespace graphene { namespace chain {
member_offset<vesting_balance_object, asset_id_type, (size_t) (offsetof(vesting_balance_object,balance) + offsetof(asset,asset_id))>,
member_offset<vesting_balance_object, share_type, (size_t) (offsetof(vesting_balance_object,balance) + offsetof(asset,amount))>
//member<vesting_balance_object, account_id_type, &vesting_balance_object::owner>
//member_offset<vesting_balance_object, account_id_type, (size_t) (offset_s(vesting_balance_object,owner))>
//member_offset<vesting_balance_object, account_id_type, (size_t) (offsetof(vesting_balance_object,owner))>
>,
composite_key_compare<
std::less< asset_id_type >,