mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18:20 +00:00
Add templated As() method to Val, use in various places we were using dynamic_cast
This commit is contained in:
parent
a7b5915b1a
commit
a94fcad957
7 changed files with 28 additions and 14 deletions
|
@ -318,7 +318,7 @@ Connection* NetSessions::FindConnection(Val* v)
|
|||
return nullptr;
|
||||
|
||||
RecordType* vr = vt->AsRecordType();
|
||||
auto vl = dynamic_cast<RecordVal*>(v);
|
||||
auto vl = v->As<RecordVal*>();
|
||||
|
||||
int orig_h, orig_p; // indices into record's value list
|
||||
int resp_h, resp_p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue