mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Add a couple of mising assignment operators to match copy constructors
This commit is contained in:
parent
e8dbfc1cb0
commit
859588d710
4 changed files with 33 additions and 0 deletions
14
src/Type.cc
14
src/Type.cc
|
@ -947,6 +947,20 @@ TypeDecl::~TypeDecl()
|
|||
delete[] id;
|
||||
}
|
||||
|
||||
TypeDecl& TypeDecl::operator=(const TypeDecl& other)
|
||||
{
|
||||
if ( this == &other )
|
||||
return *this;
|
||||
|
||||
type = other.type;
|
||||
attrs = other.attrs;
|
||||
|
||||
delete[] id;
|
||||
id = util::copy_string(other.id);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void TypeDecl::DescribeReST(ODesc* d, bool roles_only) const
|
||||
{
|
||||
d->Add(id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue