mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
tidying
This commit is contained in:
parent
50a1367dbb
commit
2f14205010
1 changed files with 1 additions and 2 deletions
|
@ -55,13 +55,12 @@ eval EvalIndexVec($$, $1, $2)
|
||||||
|
|
||||||
macro EvalIndexVec(lhs, rhs_vec, index)
|
macro EvalIndexVec(lhs, rhs_vec, index)
|
||||||
auto& vv = rhs_vec->RawVec();
|
auto& vv = rhs_vec->RawVec();
|
||||||
const auto& vec = vv;
|
|
||||||
zeek_int_t ind = index;
|
zeek_int_t ind = index;
|
||||||
if ( ind < 0 )
|
if ( ind < 0 )
|
||||||
ind += vv.size();
|
ind += vv.size();
|
||||||
if ( ind < 0 || ind >= int(vv.size()) )
|
if ( ind < 0 || ind >= int(vv.size()) )
|
||||||
ERROR("no such index");
|
ERROR("no such index");
|
||||||
AssignTarget(lhs, CopyVal(*vec[ind]))
|
AssignTarget(lhs, CopyVal(*(vv[ind])))
|
||||||
|
|
||||||
internal-op Index-VecC
|
internal-op Index-VecC
|
||||||
class VVi
|
class VVi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue