mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Deprecate VectorVal::Lookup(), replace with At()
This commit is contained in:
parent
69533bcbc6
commit
a384bb8b81
16 changed files with 74 additions and 69 deletions
|
@ -266,7 +266,7 @@ char* CompositeHash::SingleValHash(bool type_check, char* kp0,
|
|||
kp1 = reinterpret_cast<char*>(kp+1);
|
||||
for ( unsigned int i = 0; i < vv->Size(); ++i )
|
||||
{
|
||||
Val* val = vv->Lookup(i);
|
||||
const auto& val = vv->At(i);
|
||||
unsigned int* kp = AlignAndPadType<unsigned int>(kp1);
|
||||
*kp = i;
|
||||
kp1 = reinterpret_cast<char*>(kp+1);
|
||||
|
@ -277,7 +277,8 @@ char* CompositeHash::SingleValHash(bool type_check, char* kp0,
|
|||
if ( val )
|
||||
{
|
||||
if ( ! (kp1 = SingleValHash(type_check, kp1,
|
||||
vt->Yield().get(), val, false)) )
|
||||
vt->Yield().get(), val.get(),
|
||||
false)) )
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -564,12 +565,12 @@ int CompositeHash::SingleTypeKeySize(BroType* bt, const Val* v,
|
|||
VectorVal* vv = const_cast<VectorVal*>(v->AsVectorVal());
|
||||
for ( unsigned int i = 0; i < vv->Size(); ++i )
|
||||
{
|
||||
Val* val = vv->Lookup(i);
|
||||
const auto& val = vv->At(i);
|
||||
sz = SizeAlign(sz, sizeof(unsigned int));
|
||||
sz = SizeAlign(sz, sizeof(unsigned int));
|
||||
if ( val )
|
||||
sz = SingleTypeKeySize(bt->AsVectorType()->Yield().get(),
|
||||
val, type_check, sz, false,
|
||||
val.get(), type_check, sz, false,
|
||||
calc_static_size);
|
||||
if ( ! sz ) return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue