mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
util: pass std::string_view to tokenize_string()
This saves some overhead because some callers pass a plain C string here which needed to be copied to a temporary std::string.
This commit is contained in:
parent
e068ad8a53
commit
f1566bda14
2 changed files with 4 additions and 3 deletions
|
@ -1501,7 +1501,7 @@ TEST_CASE("util tokenize_string")
|
|||
CHECK(v2.size() == 1);
|
||||
}
|
||||
|
||||
vector<string>* tokenize_string(const string &input, const string& delim,
|
||||
vector<string>* tokenize_string(const std::string_view input, const std::string_view delim,
|
||||
vector<string>* rval, int limit)
|
||||
{
|
||||
if ( ! rval )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue