remove string_view from headers
This should allow usage with C++11 projects. It's also wrong. The only user of this assigns an std::string from a string_view, which is not safe. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
+1
-1
@@ -79,7 +79,7 @@ char from_hex(char ch) {
|
||||
return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10;
|
||||
}
|
||||
|
||||
std::string urlencode(std::string_view str) {
|
||||
std::string urlencode(const std::string& str) {
|
||||
std::string encoded;
|
||||
encoded.reserve(str.size() * 3);
|
||||
for (uint8_t c : str) {
|
||||
|
||||
Reference in New Issue
Block a user