-
-
Notifications
You must be signed in to change notification settings - Fork 736
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
ICU-22936 Replace all ICU4C code that uses UBool as an integer #3232
Conversation
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. A couple nits you can ignore.
// Use two variables so that getMergedCollationKey() is always called for both strings. | ||
if (UBool prev = getMergedCollationKey(prevString.getBuffer(), prevString.length(), prevKey, errorCode), | ||
curr = getMergedCollationKey(s.getBuffer(), s.length(), key, errorCode); | ||
prev || curr || errorCode.isFailure()) { |
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.
This seems like it'd read better if we just moved the definitions of prev
and curr
out of the condition of the if
statement.
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.
optional: I agree that if we can't use the bit-wise OR any more then pulling out the two variables, like in the other file, is more readable. Mostly because of the fairly long function calls.
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.
Maybe, but I don't think that's something that'd be worth spending another round of review/approval on.
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.
thanks!
// Use two variables so that getMergedCollationKey() is always called for both strings. | ||
if (UBool prev = getMergedCollationKey(prevString.getBuffer(), prevString.length(), prevKey, errorCode), | ||
curr = getMergedCollationKey(s.getBuffer(), s.length(), key, errorCode); | ||
prev || curr || errorCode.isFailure()) { |
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.
optional: I agree that if we can't use the bit-wise OR any more then pulling out the two variables, like in the other file, is more readable. Mostly because of the fairly long function calls.
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
Checklist