Skip to content

Improve convert_hex_to_binary x86_64 codegen. #473

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/unicode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ unsigned constexpr convert_hex_to_binary(const char c) noexcept {
if (c <= '9') {
return c - '0';
}
char del = c >= 'a' ? 'a' : 'A';
return 10 + (c - del);
char del = (c >= 'a' ? 'a' : 'A') - 10;
return c - del;
}

std::string percent_decode(const std::string_view input, size_t first_percent) {
Expand Down