Factor static-local nil IntrusivePtrs to global locations

Minor optimization to remove any run-time impact.
This commit is contained in:
Jon Siwek 2020-05-21 17:22:39 -07:00
parent a384bb8b81
commit ea878208ba
8 changed files with 21 additions and 23 deletions

View file

@ -141,6 +141,8 @@ const int MATCHES_INDEX_VECTOR = 2;
class BroType : public BroObj {
public:
static inline const IntrusivePtr<BroType> nil;
explicit BroType(TypeTag tag, bool base_type = false);
// Performs a shallow clone operation of the Bro type.
@ -456,6 +458,8 @@ protected:
class FuncType final : public BroType {
public:
static inline const IntrusivePtr<FuncType> nil;
/**
* Prototype is only currently used for events and hooks which declare
* multiple signature prototypes that allow users to have handlers