Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Added greater than operator for extended_asset #1061

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Avm07
Copy link

@Avm07 Avm07 commented Mar 2, 2021

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

Copy link
Contributor

@brianjohnson5972 brianjohnson5972 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@brianjohnson5972
Copy link
Contributor

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

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

@Avm07
Copy link
Author

Avm07 commented Mar 3, 2021

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
Copy link
Author

Avm07 commented Mar 4, 2021

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants