mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
change vector assignment operator and remove unnecessary argument (expr)
This commit is contained in:
parent
a2556642e6
commit
8f259f866d
15 changed files with 63 additions and 69 deletions
10
src/Val.h
10
src/Val.h
|
@ -968,18 +968,16 @@ public:
|
|||
// Note: does NOT Ref() the element! Remember to do so unless
|
||||
// the element was just created and thus has refcount 1.
|
||||
//
|
||||
bool Assign(unsigned int index, Val* element, const Expr* assigner,
|
||||
Opcode op = OP_ASSIGN);
|
||||
bool Assign(Val* index, Val* element, const Expr* assigner,
|
||||
Opcode op = OP_ASSIGN)
|
||||
bool Assign(unsigned int index, Val* element, Opcode op = OP_ASSIGN);
|
||||
bool Assign(Val* index, Val* element, Opcode op = OP_ASSIGN)
|
||||
{
|
||||
return Assign(index->AsListVal()->Index(0)->CoerceToUnsigned(),
|
||||
element, assigner, op);
|
||||
element, op);
|
||||
}
|
||||
|
||||
// Assigns the value to how_many locations starting at index.
|
||||
bool AssignRepeat(unsigned int index, unsigned int how_many,
|
||||
Val* element, const Expr* assigner);
|
||||
Val* element);
|
||||
|
||||
// Returns nil if no element was at that value.
|
||||
// Lookup does NOT grow the vector to this size.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue