mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
util: use "auto" in normalize_path()
This commit is contained in:
parent
53c4e30024
commit
37cbd98e34
1 changed files with 2 additions and 3 deletions
|
@ -1565,8 +1565,7 @@ string normalize_path(const std::string_view path)
|
|||
tokenize_string(path, "/", &components);
|
||||
final_components.reserve(components.size());
|
||||
|
||||
vector<string>::const_iterator it;
|
||||
for ( it = components.begin(); it != components.end(); ++it )
|
||||
for ( auto it = components.begin(); it != components.end(); ++it )
|
||||
{
|
||||
if ( *it == "" ) continue;
|
||||
if ( *it == "." && it != components.begin() ) continue;
|
||||
|
@ -1600,7 +1599,7 @@ string normalize_path(const std::string_view path)
|
|||
}
|
||||
}
|
||||
|
||||
for ( it = final_components.begin(); it != final_components.end(); ++it )
|
||||
for ( auto it = final_components.begin(); it != final_components.end(); ++it )
|
||||
{
|
||||
new_path.append(*it);
|
||||
new_path.append("/");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue