Skip to content

refactor: call getDisplayUnit() once instead of three times#17221

Closed
JeremyCrookshank wants to merge 2 commits intobitcoin:masterfrom
JeremyCrookshank:sendcoincodereuse
Closed

refactor: call getDisplayUnit() once instead of three times#17221
JeremyCrookshank wants to merge 2 commits intobitcoin:masterfrom
JeremyCrookshank:sendcoincodereuse

Conversation

@JeremyCrookshank
Copy link
Copy Markdown
Contributor

Noticed that getDisplayUnit() was being called 3 times but can be made more efficient if we store the value on the function once as a variable for reuse instead

Copy link
Copy Markdown
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

NACK, note the implementation:

int getDisplayUnit() const { return nDisplayUnit; }

@JeremyCrookshank JeremyCrookshank deleted the sendcoincodereuse branch October 22, 2019 20:43
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants