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:
Max Kellermann 2020-02-07 11:16:17 +01:00
parent 97f07fa727
commit 4e438bf422

View file

@ -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.