Skip to content

Commit

Permalink
Code review improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Lesiak authored and mikelik committed May 18, 2023
1 parent a1aae5f commit 65f928f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/eosiolib/contracts/eosio/multi_index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -866,11 +866,11 @@ class multi_index

auto secondary_keys = make_extractor_tuple::get_extractor_tuple(indices_type{}, obj);

uint64_t pk = _multi_index_detail::to_raw_key(obj.primary_key());
uint64_t pk = to_raw_key(obj.primary_key());

updater( obj );

eosio::check( pk == _multi_index_detail::to_raw_key(obj.primary_key()), "updater cannot change primary key when modifying an object" );
eosio::check( pk == to_raw_key(obj.primary_key()), "updater cannot change primary key when modifying an object" );

size_t size = pack_size( obj );
//using malloc/free here potentially is not exception-safe, although WASM doesn't support exceptions
Expand Down

0 comments on commit 65f928f

Please sign in to comment.