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

Warning fixes #529

Merged
merged 3 commits into from
Oct 8, 2023
Merged

Warning fixes #529

merged 3 commits into from
Oct 8, 2023

Conversation

the-moisrex
Copy link
Contributor

  • const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions
  • Some [[nodiscard]]s added
  • default argument for parse_port which is a virtual function is not recommended, I changed it to two different functions
  • using <cstdint> instead of <stdint.h>
  • Adding override for virtual destructors
  • Small changes like comment mismatch fixes and useless "return" statement removal

- const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions
- Some [[nodiscard]]s added
- default argument for `parse_port` which is a virtual function is not recommended, I changed it to two different functions
- using `<cstdint>` instead of `<stdint.h>`
- Adding `override` for virtual destructors
- Small changes like comment missmatch fixes and useless "return" statement removal
include/ada/ada_idna.h Show resolved Hide resolved
include/ada/character_sets.h Show resolved Hide resolved
include/ada/character_sets.h Outdated Show resolved Hide resolved
Copy link
Member

@lemire lemire left a comment

Choose a reason for hiding this comment

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

I strongly disagree with the change of uint8_t into std::uint8_t. You can verify that Node.js (written in C++) uses uint8_t and not std::uint8_t.

Everything else seems good and should be merged. Thanks.

There are some formatting changes that I am not going to comment upon (I only reviewed semantically relevant changes).

@lemire
Copy link
Member

lemire commented Oct 6, 2023

This is a good PR.

@the-moisrex
Copy link
Contributor Author

formatting is done via clang-format v16.0.6

git ls-files | grep -E "\.(h|cpp)\$" | xargs clang-format -i

And I'm going to change the std::uint8_t back to uint8_t in the next commit.

@anonrig anonrig merged commit b5548c5 into ada-url:main Oct 8, 2023
31 checks passed
This pull request was closed.
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.

3 participants