Performance

- Added a shortcut test that speeds up the decode process for most cases.
This commit is contained in:
Paul Beckingham 2012-01-30 00:18:53 -05:00
parent 5609711d47
commit 5e4f7feff8

View file

@ -516,6 +516,8 @@ const std::string encode (const std::string& value)
// : <- &colon;
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, "&colon;", ":"); // Deprecated 2.0
return modified;
}
return value;
}
////////////////////////////////////////////////////////////////////////////////