mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
Change base_type() to return const-ref, deprecate base_type_no_ref()
This commit is contained in:
parent
2aa84eb86e
commit
bb25f5d568
6 changed files with 34 additions and 39 deletions
|
@ -1122,7 +1122,7 @@ IntrusivePtr<Val> StringVal::DoClone(CloneState* state)
|
|||
}
|
||||
|
||||
PatternVal::PatternVal(RE_Matcher* re)
|
||||
: Val(base_type_no_ref(TYPE_PATTERN))
|
||||
: Val(base_type(TYPE_PATTERN).get())
|
||||
{
|
||||
val.re_val = re;
|
||||
}
|
||||
|
@ -1130,7 +1130,6 @@ PatternVal::PatternVal(RE_Matcher* re)
|
|||
PatternVal::~PatternVal()
|
||||
{
|
||||
delete AsPattern();
|
||||
Unref(type); // base_type() ref'd it, so did our base constructor
|
||||
}
|
||||
|
||||
bool PatternVal::AddTo(Val* v, bool /* is_first_init */) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue