mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
Use single-character version of string find() (performance-faster-string-find)
This commit is contained in:
parent
95d2af4501
commit
c32566420a
8 changed files with 10 additions and 10 deletions
|
@ -402,7 +402,7 @@ void HTTP_Entity::SubmitHeader(mime::MIME_Header* h)
|
|||
return;
|
||||
}
|
||||
|
||||
size_t p = byte_range.find("/");
|
||||
size_t p = byte_range.find('/');
|
||||
if ( p == string::npos )
|
||||
{
|
||||
http_message->Weird("HTTP_content_range_cannot_parse");
|
||||
|
@ -412,7 +412,7 @@ void HTTP_Entity::SubmitHeader(mime::MIME_Header* h)
|
|||
string byte_range_resp_spec = byte_range.substr(0, p);
|
||||
string instance_length_str = byte_range.substr(p + 1);
|
||||
|
||||
p = byte_range_resp_spec.find("-");
|
||||
p = byte_range_resp_spec.find('-');
|
||||
if ( p == string::npos )
|
||||
{
|
||||
http_message->Weird("HTTP_content_range_cannot_parse");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue