mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
-O gen-C++ maintenance: fixes for attributes & initializing globals
This commit is contained in:
parent
6fcbb55ccd
commit
26dae9a5ae
9 changed files with 54 additions and 12 deletions
|
@ -114,10 +114,14 @@ void CPP_IndexedInits<T>::Generate(InitsManager* im, std::vector<TableValPtr>& i
|
|||
auto iv_it = init_vals.begin();
|
||||
auto iv_end = init_vals.end();
|
||||
auto t = *(iv_it++);
|
||||
auto attrs = *(iv_it++);
|
||||
|
||||
auto tt = cast_intrusive<TableType>(im->Types(t));
|
||||
auto tv = make_intrusive<TableVal>(tt);
|
||||
|
||||
if ( attrs >= 0 )
|
||||
tv->SetAttrs(im->Attributes(attrs));
|
||||
|
||||
while ( iv_it != iv_end )
|
||||
{
|
||||
auto index = im->ConstVals(*(iv_it++));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue