eosio.cdt icon indicating copy to clipboard operation
eosio.cdt copied to clipboard

Added greater than operator for extended_asset

Open Avm07 opened this issue 3 years ago • 3 comments

Change Description

This PR add friend bool extended_asset::operator>( const extended_asset& a, const extended_asset& b )

API Changes

  • [ ] API Changes

Documentation Additions

  • [ ] Documentation Additions

Avm07 avatar Mar 02 '21 17:03 Avm07

Approved, but can you also add the operator>= and <= to cover them all?

with just return !(a < b) and !(a > b)

brianjohnson5972 avatar Mar 02 '21 17:03 brianjohnson5972

Approved, but can you also add the operator>= and <= to cover them all?

Comparison operators already exist: https://github.com/Avm07/eosio.cdt/blob/develop/libraries/eosiolib/core/eosio/asset.hpp#L488 https://github.com/Avm07/eosio.cdt/blob/develop/libraries/eosiolib/core/eosio/asset.hpp#L494

Avm07 avatar Mar 03 '21 08:03 Avm07

Added missing operators(>,>=,<=) for symbol_code & symbol & extended_symbol

Avm07 avatar Mar 04 '21 18:03 Avm07