mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Remove weak_ref param from ID::SetVal()
It was not used anywhere.
This commit is contained in:
parent
198d604dde
commit
28b4206519
2 changed files with 3 additions and 21 deletions
13
src/ID.cc
13
src/ID.cc
|
@ -114,7 +114,6 @@ ID::ID(const char* arg_name, IDScope arg_scope, bool arg_is_export)
|
|||
offset = 0;
|
||||
|
||||
infer_return_type = false;
|
||||
weak_ref = false;
|
||||
|
||||
SetLocationInfo(&start_location, &end_location);
|
||||
}
|
||||
|
@ -122,9 +121,6 @@ ID::ID(const char* arg_name, IDScope arg_scope, bool arg_is_export)
|
|||
ID::~ID()
|
||||
{
|
||||
delete [] name;
|
||||
|
||||
if ( weak_ref )
|
||||
val.release();
|
||||
}
|
||||
|
||||
std::string ID::ModuleName() const
|
||||
|
@ -139,17 +135,12 @@ void ID::SetType(IntrusivePtr<BroType> t)
|
|||
|
||||
void ID::ClearVal()
|
||||
{
|
||||
if ( weak_ref )
|
||||
val.release();
|
||||
val = nullptr;
|
||||
}
|
||||
|
||||
void ID::SetVal(IntrusivePtr<Val> v, bool arg_weak_ref)
|
||||
void ID::SetVal(IntrusivePtr<Val> v)
|
||||
{
|
||||
if ( weak_ref )
|
||||
val.release();
|
||||
|
||||
val = std::move(v);
|
||||
weak_ref = arg_weak_ref;
|
||||
Modified();
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue