mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Obj: disallow copying BroObj
Copying a BroObj is dangerous, and should only be done with dedicated (virtual) methods which are implemented by all derived classes. This commit avoids unintentional copies.
This commit is contained in:
parent
97f07fa727
commit
4e438bf422
1 changed files with 4 additions and 0 deletions
|
@ -73,6 +73,10 @@ public:
|
||||||
|
|
||||||
virtual ~BroObj();
|
virtual ~BroObj();
|
||||||
|
|
||||||
|
/* disallow copying */
|
||||||
|
BroObj(const BroObj &) = delete;
|
||||||
|
BroObj &operator=(const BroObj &) = delete;
|
||||||
|
|
||||||
// Report user warnings/errors. If obj2 is given, then it's
|
// Report user warnings/errors. If obj2 is given, then it's
|
||||||
// included in the message, though if pinpoint_only is non-zero,
|
// included in the message, though if pinpoint_only is non-zero,
|
||||||
// then obj2 is only used to pinpoint the location.
|
// then obj2 is only used to pinpoint the location.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue