mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Make TypePtr::Capture member variables private
The public versions were marked as deprecated for 7.0, and accessors should be used to manage them now.
This commit is contained in:
parent
a53cc4d01b
commit
260a8afebe
2 changed files with 4 additions and 9 deletions
|
@ -599,12 +599,9 @@ TypePtr SetType::ShallowClone() { return make_intrusive<SetType>(indices, elemen
|
||||||
|
|
||||||
SetType::~SetType() = default;
|
SetType::~SetType() = default;
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
FuncType::Capture::Capture(detail::IDPtr _id, bool _deep_copy) : id(std::move(_id)), deep_copy(_deep_copy) {
|
FuncType::Capture::Capture(detail::IDPtr _id, bool _deep_copy) : id(std::move(_id)), deep_copy(_deep_copy) {
|
||||||
is_managed = id ? ZVal::IsManagedType(id->GetType()) : false;
|
is_managed = id ? ZVal::IsManagedType(id->GetType()) : false;
|
||||||
}
|
}
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
|
||||||
FuncType::FuncType(RecordTypePtr arg_args, TypePtr arg_yield, FunctionFlavor arg_flavor)
|
FuncType::FuncType(RecordTypePtr arg_args, TypePtr arg_yield, FunctionFlavor arg_flavor)
|
||||||
: Type(TYPE_FUNC), args(std::move(arg_args)), arg_types(make_intrusive<TypeList>()), yield(std::move(arg_yield)) {
|
: Type(TYPE_FUNC), args(std::move(arg_args)), arg_types(make_intrusive<TypeList>()), yield(std::move(arg_yield)) {
|
||||||
|
|
10
src/Type.h
10
src/Type.h
|
@ -513,8 +513,6 @@ public:
|
||||||
public:
|
public:
|
||||||
Capture(detail::IDPtr _id, bool _deep_copy);
|
Capture(detail::IDPtr _id, bool _deep_copy);
|
||||||
|
|
||||||
#pragma GCC diagnostic push
|
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
||||||
Capture(const Capture&) = default;
|
Capture(const Capture&) = default;
|
||||||
Capture(Capture&&) = default;
|
Capture(Capture&&) = default;
|
||||||
Capture& operator=(const Capture&) = default;
|
Capture& operator=(const Capture&) = default;
|
||||||
|
@ -527,11 +525,11 @@ public:
|
||||||
|
|
||||||
// For script optimization:
|
// For script optimization:
|
||||||
void SetID(detail::IDPtr new_id) { id = std::move(new_id); }
|
void SetID(detail::IDPtr new_id) { id = std::move(new_id); }
|
||||||
#pragma GCC diagnostic pop
|
|
||||||
|
|
||||||
[[deprecated("Remove in v7.1. Use non-default constructor and associated accessors.")]] detail::IDPtr id;
|
private:
|
||||||
[[deprecated("Remove in v7.1. Use non-default constructor and associated accessors.")]] bool deep_copy;
|
detail::IDPtr id;
|
||||||
[[deprecated("Remove in v7.1. Use non-default constructor and associated accessors.")]] bool is_managed;
|
bool deep_copy;
|
||||||
|
bool is_managed;
|
||||||
};
|
};
|
||||||
|
|
||||||
using CaptureList = std::vector<Capture>;
|
using CaptureList = std::vector<Capture>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue