mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 07:08:19 +00:00
Switch FuncType capture-list storage to optional<vector<Capture>>
May help clarify overall mem-mgmt/ownership semantics.
This commit is contained in:
parent
ab15a98b28
commit
b08112b2e7
8 changed files with 44 additions and 41 deletions
|
@ -419,7 +419,7 @@ broker::expected<broker::data> Frame::SerializeCopyFrame()
|
|||
}
|
||||
|
||||
std::pair<bool, FramePtr> Frame::Unserialize(const broker::vector& data,
|
||||
const std::vector<FuncType::Capture*>* captures)
|
||||
const std::optional<FuncType::CaptureList>& captures)
|
||||
{
|
||||
if ( data.size() == 0 )
|
||||
return std::make_pair(true, nullptr);
|
||||
|
@ -505,7 +505,7 @@ std::pair<bool, FramePtr> Frame::Unserialize(const broker::vector& data,
|
|||
|
||||
std::advance(where, 1);
|
||||
|
||||
auto closure_pair = Frame::Unserialize(*has_vec, nullptr);
|
||||
auto closure_pair = Frame::Unserialize(*has_vec, {});
|
||||
if ( ! closure_pair.first )
|
||||
{
|
||||
for ( auto& i : outer_ids )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue