mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add std::move() for args to an assign_to_index call
This commit is contained in:
parent
d4ae5c5fbc
commit
2c8106295d
1 changed files with 3 additions and 2 deletions
|
@ -208,7 +208,8 @@ void Expr::AssignToIndex(ValPtr v1, ValPtr v2, ValPtr v3) const
|
|||
{
|
||||
bool iterators_invalidated;
|
||||
|
||||
auto error_msg = assign_to_index(v1, v2, v3, iterators_invalidated);
|
||||
auto error_msg = assign_to_index(std::move(v1), std::move(v2), std::move(v3),
|
||||
iterators_invalidated);
|
||||
|
||||
if ( iterators_invalidated )
|
||||
{
|
||||
|
@ -241,7 +242,7 @@ const char* assign_to_index(ValPtr v1, ValPtr v2, ValPtr v3,
|
|||
if ( ! v1 || ! v2 || ! v3 )
|
||||
return nullptr;
|
||||
|
||||
// Hold an extra reference to 'arg_v' in case the ownership transfer
|
||||
// Hold an extra reference in case the ownership transfer
|
||||
// to the table/vector goes wrong and we still want to obtain
|
||||
// diagnostic info from the original value after the assignment
|
||||
// already unref'd.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue