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

A question regarding the code #184

Closed
shlyakpavel opened this issue Aug 18, 2019 · 6 comments
Closed

A question regarding the code #184

shlyakpavel opened this issue Aug 18, 2019 · 6 comments

Comments

@shlyakpavel
Copy link
Contributor

Could someone please explain the magic here?

if (c >= UNICODE_SURROGATE_MIN) {
c =+ UNICODE_SURROGATE_MAX + 1;
}

I'm especially interested in =+ stuff

@xiangwang1
Copy link
Contributor

I think this code aims to skip code points between UNICODE_SURROGATE_MIN and UNICODE_SURROGATE_MAX which are not useful. Adding UNICODE_SURROGATE_MAX is probably the most convenient and concise way.

@shlyakpavel
Copy link
Contributor Author

Adding UNICODE_SURROGATE_MAX

Would look like c += UNICODE_SURROGATE_MAX + 1;
The present code is setting c to UNICODE_SURROGATE_MAX + 1, which is equal to
c = UNICODE_SURROGATE_MAX + 1.
I would personally prefer to change to either to += or to = (up to whatever original author meant) to avoid confusions.

@xiangwang1
Copy link
Contributor

Thanks, we'll change it.

@shlyakpavel
Copy link
Contributor Author

@xiangwang1 it looks like the issue is still not resolved

@shlyakpavel
Copy link
Contributor Author

@xiangwang1 the issue is still not resolved

fatchanghao added a commit that referenced this issue May 12, 2022
@fatchanghao
Copy link
Contributor

updated on "develop" branch.

markos referenced this issue in VectorCamp/vectorscan Aug 29, 2022
fatchanghao added a commit that referenced this issue Feb 15, 2023
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

No branches or pull requests

3 participants