Improvements from code review

This commit is contained in:
Luis Díaz Más
2022-02-19 17:27:29 +01:00
parent f774a3b25e
commit 8b3da36f42
36 changed files with 38 additions and 37 deletions
+2 -2
View File
@@ -105,11 +105,11 @@ namespace Exiv2 {
return isdigit(ch) ? ch - '0' : tolower(ch) - 'a' + 10;
}
std::string urlencode(const std::string_view& str)
std::string urlencode(std::string_view str)
{
std::string encoded;
encoded.reserve(str.size() * 3);
for (auto c : str) {
for (uint8_t c : str) {
if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~')
encoded += c;
else if (c == ' ')