Skip to content
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-21810 Fix error checking of ucurr.cpp part 1 #3027

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

FrankYFTang
Copy link
Contributor

@FrankYFTang FrankYFTang commented Jun 5, 2024

Change code inside ucurr.cpp to use LocalPointer to prepare the later changes for correct memory change

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-21810
  • Required: The PR title must be prefixed with a JIRA Issue number.
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number.
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@FrankYFTang FrankYFTang requested a review from roubert June 5, 2024 04:28
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
@FrankYFTang FrankYFTang changed the title ICU-21810 Fix error checking of ucurr.cpp ICU-21810 Fix error checking of ucurr.cpp part 1 Jun 5, 2024
@FrankYFTang FrankYFTang requested a review from roubert June 5, 2024 18:13
icu4c/source/common/ucurr.cpp Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
icu4c/source/common/ucurr.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@richgillam richgillam left a comment

Choose a reason for hiding this comment

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

LOKTM

Copy link
Member

@roubert roubert left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@markusicu markusicu left a comment

Choose a reason for hiding this comment

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

much better, thank you!

@markusicu
Copy link
Member

PS: The internal ures_... functions are another part of ICU that would benefit from modernization. In particular, the fillIn parameters were useful for avoiding some memory allocations, but are hard to get right, and hard to look at. If we did this with modern C++, we would return C++ objects (at least structs with destructors) by value, and move operators...

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@FrankYFTang FrankYFTang merged commit b82291f into unicode-org:main Jun 13, 2024
97 checks passed
@FrankYFTang FrankYFTang deleted the ICU-21810-curr branch June 13, 2024 21:31
echeran pushed a commit to echeran/icu that referenced this pull request Jun 28, 2024
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.

4 participants