Skip to content

Commit

Permalink
src: convert hex2bin() into a regular function
Browse files Browse the repository at this point in the history
No need to write hex2bin() as a function template because it's only
called with a char parameter.

Signed-off-by: Darshan Sen <[email protected]>

PR-URL: #42321
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
RaisinTen authored and bengl committed Mar 21, 2022
1 parent 78b858d commit e960424
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ void AppendOrEscape(std::string* str,
*str += ch;
}

template <typename T>
unsigned hex2bin(const T ch) {
unsigned hex2bin(const char ch) {
if (ch >= '0' && ch <= '9')
return ch - '0';
if (ch >= 'A' && ch <= 'F')
Expand Down

0 comments on commit e960424

Please sign in to comment.