mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 05:28:20 +00:00
Change int_list in CCL.h to be a vector, fix uses of int_list to match
This commit is contained in:
parent
e25caa2666
commit
a4e2cfa2be
7 changed files with 54 additions and 47 deletions
10
src/CCL.cc
10
src/CCL.cc
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "zeek-config.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "CCL.h"
|
||||
#include "RE.h"
|
||||
#include "DFA.h"
|
||||
|
@ -30,14 +32,14 @@ void CCL::Add(int sym)
|
|||
ptr_compat_int sym_p = ptr_compat_int(sym);
|
||||
|
||||
// Check to see if the character is already in the ccl.
|
||||
for ( int i = 0; i < syms->length(); ++i )
|
||||
if ( (*syms)[i] == sym_p )
|
||||
for ( auto sym : *syms )
|
||||
if ( sym == sym_p )
|
||||
return;
|
||||
|
||||
syms->append(sym_p);
|
||||
syms->push_back(sym_p);
|
||||
}
|
||||
|
||||
void CCL::Sort()
|
||||
{
|
||||
syms->sort(int_list_cmp);
|
||||
std::sort(syms->begin(), syms->end());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue