mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
migrate to differentiated vector "At" accessors to support future efficiency
This commit is contained in:
parent
bc4a6c0d07
commit
0118b6ee38
15 changed files with 91 additions and 89 deletions
|
@ -265,7 +265,7 @@ char* CompositeHash::SingleValHash(bool type_check, char* kp0,
|
|||
kp1 = reinterpret_cast<char*>(kp+1);
|
||||
for ( unsigned int i = 0; i < vv->Size(); ++i )
|
||||
{
|
||||
const auto& val = vv->At(i);
|
||||
auto val = vv->ValAt(i);
|
||||
unsigned int* kp = AlignAndPadType<unsigned int>(kp1);
|
||||
*kp = i;
|
||||
kp1 = reinterpret_cast<char*>(kp+1);
|
||||
|
@ -566,7 +566,7 @@ int CompositeHash::SingleTypeKeySize(Type* bt, const Val* v,
|
|||
VectorVal* vv = const_cast<VectorVal*>(v->AsVectorVal());
|
||||
for ( unsigned int i = 0; i < vv->Size(); ++i )
|
||||
{
|
||||
const auto& val = vv->At(i);
|
||||
auto val = vv->ValAt(i);
|
||||
sz = SizeAlign(sz, sizeof(unsigned int));
|
||||
sz = SizeAlign(sz, sizeof(unsigned int));
|
||||
if ( val )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue