mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Use ranges::reverse_view to fix a few reverse ranged-for loops
This commit is contained in:
parent
832f67e91c
commit
8640f92b1f
4 changed files with 14 additions and 11 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <optional>
|
||||
#include <ranges>
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
|
||||
|
@ -375,8 +376,8 @@ void Manager::ActivateDynamicPlugins(bool all) {
|
|||
}
|
||||
|
||||
void Manager::UpdateInputFiles() {
|
||||
for ( file_list::const_reverse_iterator i = scripts_to_load.rbegin(); i != scripts_to_load.rend(); i++ )
|
||||
add_input_file_at_front((*i).c_str());
|
||||
for ( const auto& script : std::ranges::reverse_view(scripts_to_load) )
|
||||
add_input_file_at_front(script.c_str());
|
||||
|
||||
scripts_to_load.clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue