Add templated As() method to Val, use in various places we were using dynamic_cast

This commit is contained in:
Tim Wojtulewicz 2020-12-03 14:25:18 -07:00
parent a7b5915b1a
commit a94fcad957
7 changed files with 28 additions and 14 deletions

View file

@ -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;