mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
the "Capture" struct is now a class
This commit is contained in:
parent
528aa6766a
commit
b6464814c9
6 changed files with 24 additions and 8 deletions
14
src/Type.h
14
src/Type.h
|
@ -511,10 +511,22 @@ public:
|
|||
/**
|
||||
* A single lambda "capture" (outer variable used in a lambda's body).
|
||||
*/
|
||||
struct Capture
|
||||
class Capture
|
||||
{
|
||||
public:
|
||||
Capture(detail::IDPtr _id, bool _deep_copy);
|
||||
|
||||
auto& Id() const { return id; }
|
||||
bool IsDeepCopy() const { return deep_copy; }
|
||||
bool IsManaged() const { return is_managed; }
|
||||
|
||||
// For script optimization:
|
||||
void SetID(detail::IDPtr new_id) { id = std::move(new_id); }
|
||||
|
||||
private:
|
||||
detail::IDPtr id;
|
||||
bool deep_copy;
|
||||
bool is_managed;
|
||||
};
|
||||
|
||||
using CaptureList = std::vector<Capture>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue