Skip to content

Commit

Permalink
Merge pull request EOSIO#3220 from jafri/patch-1
Browse files Browse the repository at this point in the history
Unused params in eosio.token
  • Loading branch information
bytemaster authored May 23, 2018
2 parents 25ebcd1 + 32c4d7b commit 5c3c9fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions contracts/eosio.token/eosio.token.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void token::issue( account_name to, asset quantity, string memo )
s.supply += quantity;
});

add_balance( st.issuer, quantity, st, st.issuer );
add_balance( st.issuer, quantity, st.issuer );

if( to != st.issuer ) {
SEND_INLINE_ACTION( *this, transfer, {st.issuer,N(active)}, {st.issuer, to, quantity, memo} );
Expand Down Expand Up @@ -80,11 +80,11 @@ void token::transfer( account_name from,
eosio_assert( memo.size() <= 256, "memo has more than 256 bytes" );


sub_balance( from, quantity, st );
add_balance( to, quantity, st, from );
sub_balance( from, quantity );
add_balance( to, quantity, from );
}

void token::sub_balance( account_name owner, asset value, const currency_stats& st ) {
void token::sub_balance( account_name owner, asset value ) {
accounts from_acnts( _self, owner );

const auto& from = from_acnts.get( value.symbol.name(), "no balance object found" );
Expand All @@ -100,7 +100,7 @@ void token::sub_balance( account_name owner, asset value, const currency_stats&
}
}

void token::add_balance( account_name owner, asset value, const currency_stats& st, account_name ram_payer )
void token::add_balance( account_name owner, asset value, account_name ram_payer )
{
accounts to_acnts( _self, owner );
auto to = to_acnts.find( value.symbol.name() );
Expand Down
5 changes: 2 additions & 3 deletions contracts/eosio.token/eosio.token.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ namespace eosio {
typedef eosio::multi_index<N(accounts), account> accounts;
typedef eosio::multi_index<N(stat), currency_stats> stats;

void sub_balance( account_name owner, asset value, const currency_stats& st );
void add_balance( account_name owner, asset value, const currency_stats& st,
account_name ram_payer );
void sub_balance( account_name owner, asset value );
void add_balance( account_name owner, asset value, account_name ram_payer );

public:
struct transfer_args {
Expand Down

0 comments on commit 5c3c9fd

Please sign in to comment.