-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: introduce enum class for MnType and clean up implementation accordingly #5200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ogabrielides
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one nit
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, utACK
ogabrielides
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, utACK
Issue being fixed or feature implemented
expressions like
nType == MnType::HighPerformance.indexlook pretty confusing in current implementation of 4k HPMN.Changing
uint8_tindex toenum class MnType : uint8_tgive pros:.indexfrom MnTypeBut also Cons:
log("%d", nType)you need to writelog("%d", static_cast<int>(nType));What was done?
Introduced new enum class MnType and rewritten generating Regular/HighPerformance objects with params (description, collateral amount, etc).
Also were added attributes [[no_discard]] for related code.
How Has This Been Tested?
Run unit/functional tests
Breaking Changes
No breaking changes.
Checklist: