mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Deprecate RecordVal::LookupWithDefault() replace with GetFieldOrDefault()
(The former was previously changed during this release cycle to return Intrusive pointer, but this just changes it back to return Val* and deprecates it).
This commit is contained in:
parent
f729247778
commit
2b4d80c849
7 changed files with 26 additions and 11 deletions
|
@ -161,13 +161,13 @@ void File::RaiseFileOverNewConnection(Connection* conn, bool is_orig)
|
|||
|
||||
uint64_t File::LookupFieldDefaultCount(int idx) const
|
||||
{
|
||||
auto v = val->LookupWithDefault(idx);
|
||||
auto v = val->GetFieldOrDefault(idx);
|
||||
return v->AsCount();
|
||||
}
|
||||
|
||||
double File::LookupFieldDefaultInterval(int idx) const
|
||||
{
|
||||
auto v = val->LookupWithDefault(idx);
|
||||
auto v = val->GetFieldOrDefault(idx);
|
||||
return v->AsInterval();
|
||||
}
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ protected:
|
|||
void IncrementByteCount(uint64_t size, int field_idx);
|
||||
|
||||
/**
|
||||
* Wrapper to RecordVal::LookupWithDefault for the field in #val at index
|
||||
* Wrapper to RecordVal::GetFieldOrDefault for the field in #val at index
|
||||
* \a idx which automatically unrefs the Val and returns a converted value.
|
||||
* @param idx the index of a field of type "count" in \c fa_file.
|
||||
* @return the value of the field, which may be it &default.
|
||||
|
@ -267,7 +267,7 @@ protected:
|
|||
uint64_t LookupFieldDefaultCount(int idx) const;
|
||||
|
||||
/**
|
||||
* Wrapper to RecordVal::LookupWithDefault for the field in #val at index
|
||||
* Wrapper to RecordVal::GetFieldOrDefault for the field in #val at index
|
||||
* \a idx which automatically unrefs the Val and returns a converted value.
|
||||
* @param idx the index of a field of type "interval" in \c fa_file.
|
||||
* @return the value of the field, which may be it &default.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue