Minor whitespace fixes during merge.

* 'smart_ptr' of https://github.com/MaxKellermann/zeek:
  OpaqueVal: remove misplaced `virtual` keywords
  CompHash: use class IntrusivePtr for the `type` field
  IntrusivePtr: replace the "add_ref" parameter with tag structs
  IntrusivePtr: remove reset(), nobody uses it
  IntrusivePtr: remove ordering operators
  IntrusivePtr: rename detach() to release()
  IntrusivePtr: move nullptr initializer to field declaration
This commit is contained in:
Jon Siwek 2020-02-21 10:14:05 -08:00
commit 38b25cf38d
18 changed files with 129 additions and 119 deletions

View file

@ -13,10 +13,9 @@
#include <vector>
#include <map>
CompositeHash::CompositeHash(TypeList* composite_type)
CompositeHash::CompositeHash(IntrusivePtr<TypeList> composite_type)
: type(std::move(composite_type))
{
type = composite_type;
Ref(type);
singleton_tag = TYPE_INTERNAL_ERROR;
// If the only element is a record, don't treat it as a
@ -66,7 +65,6 @@ CompositeHash::CompositeHash(TypeList* composite_type)
CompositeHash::~CompositeHash()
{
Unref(type);
delete [] key;
}