Skip to content

Replace IF..ELSE IF with SWITCH..CASE#4363

Closed
khanrn wants to merge 2 commits intoargotorg:developfrom
khanrn:libevmasm/KnownState/125
Closed

Replace IF..ELSE IF with SWITCH..CASE#4363
khanrn wants to merge 2 commits intoargotorg:developfrom
khanrn:libevmasm/KnownState/125

Conversation

@khanrn
Copy link
Copy Markdown
Contributor

@khanrn khanrn commented Jun 27, 2018

I think SWITCH..CASE..DEFAULT is much simpler than IF..ELSE IF..ELSE. 🙂

Copy link
Copy Markdown
Collaborator

@erak erak left a comment

Choose a reason for hiding this comment

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

Please also change the commit message to something more meaningful.


assertThrow(info.ret <= 1, InvalidDeposit, "");
if (info.ret == 1)
{
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These are not needed here and can be removed again. In general, we're striving towards a coding style that supports displaying as many lines as possible on one screen.

);
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The above comment also applies to the new lines that you've added.

chriseth
chriseth previously approved these changes Jun 29, 2018
@khanrn khanrn force-pushed the libevmasm/KnownState/125 branch from 20c5d7f to 5e0219b Compare July 2, 2018 09:34
@khanrn
Copy link
Copy Markdown
Contributor Author

khanrn commented Jul 2, 2018

Some git issue happened when squashing. A cleaned #4398 PR has been submitted as a replacement of this PR.

@khanrn khanrn closed this Jul 2, 2018
@khanrn khanrn deleted the libevmasm/KnownState/125 branch July 2, 2018 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants