mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Superficial changes to script-opt related code
* Rename overly generic ACCESSORS macro with ZEEK_ prefix * A few places where whitespace was noticeably wrong/distracting * Minor/obvious reference/move semantics improvements suggested by linter * Remove unused detail::Scope::Remove(), no need for deprecation
This commit is contained in:
parent
ff7d9e3d72
commit
481d989495
9 changed files with 23 additions and 46 deletions
19
src/Expr.h
19
src/Expr.h
|
@ -179,19 +179,18 @@ public:
|
|||
void MarkParen() { paren = true; }
|
||||
bool IsParen() const { return paren; }
|
||||
|
||||
#undef ACCESSORS
|
||||
#define ACCESSORS(ctype) \
|
||||
#define ZEEK_EXPR_ACCESSOR_DECLS(ctype) \
|
||||
const ctype* As ## ctype () const; \
|
||||
ctype* As ## ctype (); \
|
||||
IntrusivePtr<ctype> As ## ctype ## Ptr ();
|
||||
|
||||
ACCESSORS(ListExpr)
|
||||
ACCESSORS(NameExpr)
|
||||
ACCESSORS(ConstExpr)
|
||||
ACCESSORS(CallExpr)
|
||||
ACCESSORS(AssignExpr)
|
||||
ACCESSORS(IndexExpr)
|
||||
ACCESSORS(EventExpr)
|
||||
ZEEK_EXPR_ACCESSOR_DECLS(ListExpr)
|
||||
ZEEK_EXPR_ACCESSOR_DECLS(NameExpr)
|
||||
ZEEK_EXPR_ACCESSOR_DECLS(ConstExpr)
|
||||
ZEEK_EXPR_ACCESSOR_DECLS(CallExpr)
|
||||
ZEEK_EXPR_ACCESSOR_DECLS(AssignExpr)
|
||||
ZEEK_EXPR_ACCESSOR_DECLS(IndexExpr)
|
||||
ZEEK_EXPR_ACCESSOR_DECLS(EventExpr)
|
||||
|
||||
void Describe(ODesc* d) const override final;
|
||||
|
||||
|
@ -770,7 +769,7 @@ public:
|
|||
TableConstructorExpr(ListExprPtr constructor_list,
|
||||
std::unique_ptr<std::vector<AttrPtr>> attrs,
|
||||
TypePtr arg_type = nullptr,
|
||||
AttributesPtr arg_attrs = nullptr);
|
||||
AttributesPtr arg_attrs = nullptr);
|
||||
|
||||
[[deprecated("Remove in v4.1. Use GetAttrs().")]]
|
||||
Attributes* Attrs() { return attrs.get(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue