Permalink
Browse files

epee: speed up string matching a bit

  • Loading branch information...
moneromooo-monero committed Nov 26, 2018
1 parent c9cae78 commit 86a4deae8ce7df26fd0ed101d53a57cd08b5097a
Showing with 6 additions and 0 deletions.
  1. +6 −0 contrib/epee/include/storages/parserse_base_utils.h
@@ -96,6 +96,12 @@ namespace misc_utils
bool escape_mode = false;
std::string::const_iterator it = star_end_string;
++it;
std::string::const_iterator fi = it;
while (fi != buf_end && *fi != '\\' && *fi != '\"')
++fi;
val.assign(it, fi);
val.reserve(std::distance(star_end_string, buf_end));
it = fi;
for(;it != buf_end;it++)
{
if(escape_mode/*prev_ch == '\\'*/)

0 comments on commit 86a4dea

Please sign in to comment.