mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
-O gen-C++ fix for recent smart pointer changes
This commit is contained in:
parent
bf6d030894
commit
10797bb955
1 changed files with 2 additions and 2 deletions
|
@ -406,14 +406,14 @@ void CPPCompile::GenWhenStmt(const WhenStmt* w)
|
|||
|
||||
Emit("{ // begin a new scope for internal variables");
|
||||
|
||||
Emit("static WhenInfo* CPP__wi = nullptr;");
|
||||
Emit("static std::shared_ptr<WhenInfo> CPP__wi = nullptr;");
|
||||
Emit("static IDSet CPP__w_globals;");
|
||||
|
||||
NL();
|
||||
|
||||
Emit("if ( ! CPP__wi )");
|
||||
StartBlock();
|
||||
Emit("CPP__wi = new WhenInfo(%s);", is_return);
|
||||
Emit("CPP__wi = std::make_shared<WhenInfo>(%s);", is_return);
|
||||
for ( auto& wg : wi->WhenExprGlobals() )
|
||||
Emit("CPP__w_globals.insert(find_global__CPP(\"%s\").get());", wg->Name());
|
||||
EndBlock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue