Use single-character version of string find() (performance-faster-string-find)

This commit is contained in:
Tim Wojtulewicz 2020-02-03 11:19:37 -05:00
parent 95d2af4501
commit c32566420a
8 changed files with 10 additions and 10 deletions

View file

@ -300,7 +300,7 @@ threading::Value* Ascii::ParseValue(const string& s, const string& name, TypeTag
case TYPE_SUBNET:
{
string unescaped = strstrip(get_unescaped_string(s));
size_t pos = unescaped.find("/");
size_t pos = unescaped.find('/');
if ( pos == unescaped.npos )
{
GetThread()->Warning(GetThread()->Fmt("Invalid value for subnet: %s", start));