src: use enum class instead of enum in node_i18n#45646
Merged
nodejs-github-bot merged 4 commits intonodejs:mainfrom Nov 30, 2022
Merged
src: use enum class instead of enum in node_i18n#45646nodejs-github-bot merged 4 commits intonodejs:mainfrom
enum class instead of enum in node_i18n#45646nodejs-github-bot merged 4 commits intonodejs:mainfrom
Conversation
2ea515e to
eb666b2
Compare
tniessen
reviewed
Nov 27, 2022
| void SetDefaultTimeZone(const char* tzid); | ||
|
|
||
| enum idna_mode { | ||
| enum class idna_mode { |
Member
There was a problem hiding this comment.
I suggest removing the IDNA_ prefix from the members of idna_mode since the scope is changing. For example, idna_mode::IDNA_STRICT should just be idna_mode::STRICT.
Contributor
Author
There was a problem hiding this comment.
I think good suggestion from a clean code point of view. Removed IDNA_ prefix.
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class
eb666b2 to
bc0541f
Compare
Contributor
Author
|
@tniessen BTW, I have one question about test. For now, |
bc0541f to
5d4cb6f
Compare
Member
|
Windows errors: |
This change is needed to fix error of window build.
RaisinTen
reviewed
Nov 28, 2022
RaisinTen
approved these changes
Nov 28, 2022
Contributor
Author
Thanks to your sharing, I could find solution to avoid error of window build. |
tniessen
approved these changes
Nov 28, 2022
This comment was marked as outdated.
This comment was marked as outdated.
16 tasks
JungMinu
approved these changes
Nov 29, 2022
Collaborator
15 tasks
Collaborator
|
Landed in 1750a94 |
ErickWendel
pushed a commit
to ErickWendel/node
that referenced
this pull request
Nov 30, 2022
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class PR-URL: nodejs#45646 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This was referenced Dec 1, 2022
targos
pushed a commit
that referenced
this pull request
Dec 12, 2022
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class PR-URL: #45646 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Dec 30, 2022
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class PR-URL: #45646 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Dec 30, 2022
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class PR-URL: #45646 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Jan 3, 2023
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class PR-URL: #45646 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Jan 4, 2023
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class PR-URL: #45646 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Jan 5, 2023
"enum class" has more advantages than "enum" because it's strongly typed and scoped. Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class PR-URL: #45646 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"enum class" has more advantages than "enum" because it's strongly typed and scoped.
Refs: https://isocpp.org/wiki/faq/cpp11-language-types#enum-class