mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 15:18:20 +00:00
Address PR review feedback on zam-feature-complete
* insert_or_assign usage * master -> primary * FunctionIngredientsPtr * FuncType::Capture deprecations * no new ScriptFunc constructor
This commit is contained in:
parent
46d3526b40
commit
cb15e0d4f1
11 changed files with 71 additions and 53 deletions
22
src/Type.h
22
src/Type.h
|
@ -516,17 +516,31 @@ public:
|
|||
public:
|
||||
Capture(detail::IDPtr _id, bool _deep_copy);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
Capture(const Capture&) = default;
|
||||
Capture(Capture&&) = default;
|
||||
Capture& operator=(const Capture&) = default;
|
||||
Capture& operator=(Capture&&) = default;
|
||||
~Capture() = default;
|
||||
|
||||
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); }
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
private:
|
||||
detail::IDPtr id;
|
||||
bool deep_copy;
|
||||
bool is_managed;
|
||||
[[deprecated(
|
||||
"Remove in v7.1. Use non-default constructor and associated accessors.")]] detail::
|
||||
IDPtr id;
|
||||
[[deprecated(
|
||||
"Remove in v7.1. Use non-default constructor and associated accessors.")]] bool
|
||||
deep_copy;
|
||||
[[deprecated(
|
||||
"Remove in v7.1. Use non-default constructor and associated accessors.")]] bool
|
||||
is_managed;
|
||||
};
|
||||
|
||||
using CaptureList = std::vector<Capture>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue