mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 01:28:20 +00:00
Deprecate TableEntryVal::Value(), replace with GetVal()
This commit is contained in:
parent
5742810293
commit
fcaade6e31
7 changed files with 42 additions and 29 deletions
|
@ -689,9 +689,8 @@ extern double bro_start_network_time;
|
|||
|
||||
class TableEntryVal {
|
||||
public:
|
||||
template<typename V>
|
||||
explicit TableEntryVal(V&& v)
|
||||
: val(std::forward<V>(v))
|
||||
explicit TableEntryVal(IntrusivePtr<Val> v)
|
||||
: val(std::move(v))
|
||||
{
|
||||
last_access_time = network_time;
|
||||
expire_access_time =
|
||||
|
@ -700,8 +699,12 @@ public:
|
|||
|
||||
TableEntryVal* Clone(Val::CloneState* state);
|
||||
|
||||
[[deprecated("Remove in v4.1. Use GetVal().")]]
|
||||
Val* Value() { return val.get(); }
|
||||
|
||||
const IntrusivePtr<Val>& GetVal() const
|
||||
{ return val; }
|
||||
|
||||
// Returns/sets time of last expiration relevant access to this value.
|
||||
double ExpireAccessTime() const
|
||||
{ return bro_start_network_time + expire_access_time; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue