diff --git a/src/Expr.h b/src/Expr.h index 3bb9633cb6..f6e45561a7 100644 --- a/src/Expr.h +++ b/src/Expr.h @@ -1066,8 +1066,8 @@ extern VectorValPtr vector_int_select(VectorTypePtr vt, const VectorVal* v1, con // aggregates, so that if any of them are Modifiable(), the associated // Trigger can register interest in changes to them. // -// One Fine Day we should do the equivalent for accessing fields in records, -// too. +// TODO: One Fine Day we should do the equivalent for accessing fields +// in records, too. class IndexExprWhen final : public IndexExpr { public: diff --git a/src/Stmt.cc b/src/Stmt.cc index f578553c86..00d29e8eb6 100644 --- a/src/Stmt.cc +++ b/src/Stmt.cc @@ -1801,8 +1801,8 @@ TraversalCode NullStmt::Traverse(TraversalCallback* cb) const HANDLE_TC_STMT_POST(tc); } -WhenInfo::WhenInfo(ExprPtr _cond, FuncType::CaptureList* _cl, bool _is_return) - : cond(std::move(_cond)), cl(_cl), is_return(_is_return) +WhenInfo::WhenInfo(ExprPtr arg_cond, FuncType::CaptureList* arg_cl, bool arg_is_return) + : cond(std::move(arg_cond)), cl(arg_cl), is_return(arg_is_return) { prior_vars = current_scope()->Vars(); @@ -1861,7 +1861,7 @@ WhenInfo::WhenInfo(ExprPtr _cond, FuncType::CaptureList* _cl, bool _is_return) arg_id->SetType(count_t); } -WhenInfo::WhenInfo(bool _is_return) : is_return(_is_return) +WhenInfo::WhenInfo(bool arg_is_return) : is_return(arg_is_return) { // This won't be needed once we remove the deprecated semantics. cl = new zeek::FuncType::CaptureList; @@ -2049,7 +2049,7 @@ void WhenInfo::BuildInvokeElems() invoke_timeout = make_intrusive(three_const); } -WhenStmt::WhenStmt(WhenInfo* _wi) : Stmt(STMT_WHEN), wi(_wi) +WhenStmt::WhenStmt(WhenInfo* arg_wi) : Stmt(STMT_WHEN), wi(arg_wi) { wi->Build(ThisPtr()); diff --git a/src/Stmt.h b/src/Stmt.h index 462b339a20..2fd18d225d 100644 --- a/src/Stmt.h +++ b/src/Stmt.h @@ -546,19 +546,19 @@ class WhenInfo public: // Takes ownership of the CaptureList, which if nil signifies // old-style frame semantics. - WhenInfo(ExprPtr _cond, FuncType::CaptureList* _cl, bool _is_return); + WhenInfo(ExprPtr cond, FuncType::CaptureList* cl, bool is_return); // Constructor used by script optimization to create a stub. - WhenInfo(bool _is_return); + WhenInfo(bool is_return); ~WhenInfo() { delete cl; } - void AddBody(StmtPtr _s) { s = std::move(_s); } + void AddBody(StmtPtr arg_s) { s = std::move(arg_s); } - void AddTimeout(ExprPtr _timeout, StmtPtr _timeout_s) + void AddTimeout(ExprPtr arg_timeout, StmtPtr arg_timeout_s) { - timeout = std::move(_timeout); - timeout_s = std::move(_timeout_s); + timeout = std::move(arg_timeout); + timeout_s = std::move(arg_timeout_s); } // Complete construction of the associated internals, including diff --git a/src/script_opt/CPP/RuntimeOps.h b/src/script_opt/CPP/RuntimeOps.h index 12432f6662..d4d8ba2034 100644 --- a/src/script_opt/CPP/RuntimeOps.h +++ b/src/script_opt/CPP/RuntimeOps.h @@ -59,8 +59,6 @@ extern ValPtr when_invoke__CPP(Func* f, std::vector args, Frame* frame, // Thrown when a call inside a "when" delays. class DelayedCallException : public InterpreterException { -public: - DelayedCallException() { } }; // Assigns the given value to the given global. A separate function because diff --git a/src/script_opt/CPP/maint/README b/src/script_opt/CPP/maint/README index 27b86cf65b..f1383be5f0 100644 --- a/src/script_opt/CPP/maint/README +++ b/src/script_opt/CPP/maint/README @@ -7,6 +7,8 @@ If you make changes to the scripts, format them using shfmt -w -i 4 -ci *.sh +(or set up "pre-commit" and use "pre-commit run -a") + The maintenance workflow: 1. Update this timestamp, so this file will be changed and you'll remember