From 7a64b4e5cfa95e4a776e166c037f40df909d0564 Mon Sep 17 00:00:00 2001 From: Darshan Sen Date: Sun, 13 Mar 2022 20:30:35 +0530 Subject: [PATCH] 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 --- src/node_url.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_url.cc b/src/node_url.cc index 6e47acf7ae3c3f..21e2e8b58a1204 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -232,8 +232,7 @@ void AppendOrEscape(std::string* str, *str += ch; } -template -unsigned hex2bin(const T ch) { +unsigned hex2bin(const char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; if (ch >= 'A' && ch <= 'F')