mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 02:58:20 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
17
src/NFA.cc
17
src/NFA.cc
|
@ -1,6 +1,5 @@
|
|||
// See the file "COPYING" in the main distribution directory for copyright.
|
||||
|
||||
#include "zeek/zeek-config.h"
|
||||
#include "zeek/NFA.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -8,8 +7,10 @@
|
|||
#include "zeek/Desc.h"
|
||||
#include "zeek/EquivClass.h"
|
||||
#include "zeek/IntSet.h"
|
||||
#include "zeek/zeek-config.h"
|
||||
|
||||
namespace zeek::detail {
|
||||
namespace zeek::detail
|
||||
{
|
||||
|
||||
static int nfa_state_id = 0;
|
||||
|
||||
|
@ -159,9 +160,8 @@ unsigned int NFA_State::TotalMemoryAllocation() const
|
|||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
return padded_sizeof(*this)
|
||||
+ xtions.MemoryAllocation() - padded_sizeof(xtions)
|
||||
+ (epsclosure ? epsclosure->MemoryAllocation() : 0);
|
||||
return padded_sizeof(*this) + xtions.MemoryAllocation() - padded_sizeof(xtions) +
|
||||
(epsclosure ? epsclosure->MemoryAllocation() : 0);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ void NFA_Machine::LinkCopies(int n)
|
|||
for ( i = 0; i < n; ++i )
|
||||
AppendMachine(copies[i]);
|
||||
|
||||
delete [] copies;
|
||||
delete[] copies;
|
||||
}
|
||||
|
||||
NFA_Machine* NFA_Machine::DuplicateMachine()
|
||||
|
@ -243,7 +243,7 @@ void NFA_Machine::AppendMachine(NFA_Machine* m)
|
|||
final_state->AddXtion(m->FirstState());
|
||||
final_state = m->FinalState();
|
||||
|
||||
Ref(m->FirstState()); // so states stay around after the following
|
||||
Ref(m->FirstState()); // so states stay around after the following
|
||||
Unref(m);
|
||||
}
|
||||
|
||||
|
@ -332,7 +332,6 @@ NFA_Machine* make_alternate(NFA_Machine* m1, NFA_Machine* m2)
|
|||
return new NFA_Machine(first, last);
|
||||
}
|
||||
|
||||
|
||||
NFA_state_list* epsilon_closure(NFA_state_list* states)
|
||||
{
|
||||
// We just keep one of this as it may get quite large.
|
||||
|
@ -375,4 +374,4 @@ bool NFA_state_cmp_neg(const NFA_State* v1, const NFA_State* v2)
|
|||
return false;
|
||||
}
|
||||
|
||||
} // namespace zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue