Performance
- Added a shortcut test that speeds up the decode process for most cases.
This commit is contained in:
@@ -516,6 +516,8 @@ const std::string encode (const std::string& value)
|
||||
// : <- :
|
||||
const std::string decode (const std::string& value)
|
||||
{
|
||||
if (value.find ('&') != std::string::npos)
|
||||
{
|
||||
std::string modified = value;
|
||||
|
||||
// Supported encodings.
|
||||
@@ -532,6 +534,9 @@ const std::string decode (const std::string& value)
|
||||
str_replace (modified, ":", ":"); // Deprecated 2.0
|
||||
|
||||
return modified;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user