mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
RecordVal:GetRecordType: Avoid AsRecordType()
This commit is contained in:
parent
b7cdce86cf
commit
e61f060f8d
1 changed files with 1 additions and 1 deletions
|
@ -1606,7 +1606,7 @@ private:
|
||||||
// Use a reference so we can avoid Ref() / Unref() that's tickled via `GetType<zeek::RecordType>()`
|
// Use a reference so we can avoid Ref() / Unref() that's tickled via `GetType<zeek::RecordType>()`
|
||||||
const RecordType& GetRecordType() const {
|
const RecordType& GetRecordType() const {
|
||||||
assert(GetType()->Tag() == TYPE_RECORD);
|
assert(GetType()->Tag() == TYPE_RECORD);
|
||||||
return *GetType()->AsRecordType();
|
return *static_cast<RecordType*>(GetType().get()); // AsRecordType() isn't inlined
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsManaged(unsigned int offset) const { return GetRecordType().ManagedFields()[offset]; }
|
bool IsManaged(unsigned int offset) const { return GetRecordType().ManagedFields()[offset]; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue