mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
Merge remote-tracking branch 'origin/master' into topic/johanna/table-changes
* origin/master: Fix use-after-move of proc_status_file breaking -U flag Change Cirrus CI config to use org-level secured variable Deprecate Val(double, TypeTag) ctor, add TimeVal/DoubleVal subclasses GH-973: Fix the return type of topk_get_top()
This commit is contained in:
commit
9d9aefaec3
85 changed files with 904 additions and 814 deletions
20
src/Val.h
20
src/Val.h
|
@ -120,6 +120,7 @@ class Val : public BroObj {
|
|||
public:
|
||||
static inline const IntrusivePtr<Val> nil;
|
||||
|
||||
[[deprecated("Remove in v4.1. Use IntervalVal(), TimeVal(), or DoubleVal() constructors.")]]
|
||||
Val(double d, TypeTag t)
|
||||
: val(d), type(base_type(t))
|
||||
{}
|
||||
|
@ -489,14 +490,27 @@ extern ValManager* val_mgr;
|
|||
|
||||
class IntervalVal final : public Val {
|
||||
public:
|
||||
IntervalVal(double quantity, double units);
|
||||
IntervalVal(double quantity, double units = Seconds)
|
||||
: Val(quantity * units, base_type(TYPE_INTERVAL))
|
||||
{}
|
||||
|
||||
protected:
|
||||
IntervalVal() {}
|
||||
|
||||
void ValDescribe(ODesc* d) const override;
|
||||
};
|
||||
|
||||
class TimeVal final : public Val {
|
||||
public:
|
||||
TimeVal(double t)
|
||||
: Val(t, base_type(TYPE_TIME))
|
||||
{}
|
||||
};
|
||||
|
||||
class DoubleVal final : public Val {
|
||||
public:
|
||||
DoubleVal(double v)
|
||||
: Val(v, base_type(TYPE_DOUBLE))
|
||||
{}
|
||||
};
|
||||
|
||||
class PortVal final : public Val {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue