Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e960424

Browse filesBrowse files
RaisinTenbengl
authored andcommitted
src: convert hex2bin() into a regular function
No need to write hex2bin() as a function template because it's only called with a char parameter. Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #42321 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 78b858d commit e960424
Copy full SHA for e960424

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Collapse file

‎src/node_url.cc‎

Copy file name to clipboardExpand all lines: src/node_url.cc
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ void AppendOrEscape(std::string* str,
222222
*str += ch;
223223
}
224224

225-
template <typename T>
226-
unsigned hex2bin(const T ch) {
225+
unsigned hex2bin(const char ch) {
227226
if (ch >= '0' && ch <= '9')
228227
return ch - '0';
229228
if (ch >= 'A' && ch <= 'F')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.