mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
TableType: Convert table_hash unique_ptr
Cannot remove the destructor as otherwise the compiler attempts to create its implementation in Type.h where CompositeHash isn't a complete type yet and std::unique_ptr's delete fails to be instantiated.
This commit is contained in:
parent
a11ee9038b
commit
be0a22fec2
2 changed files with 5 additions and 7 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
@ -402,7 +403,7 @@ public:
|
|||
// what one gets using an empty "set()" or "table()" constructor.
|
||||
bool IsUnspecifiedTable() const;
|
||||
|
||||
const detail::CompositeHash* GetTableHash() const { return table_hash; }
|
||||
const detail::CompositeHash* GetTableHash() const { return table_hash.get(); }
|
||||
|
||||
// Called to rebuild the associated hash function when a record type
|
||||
// (that this table type depends on) gets redefined during parsing.
|
||||
|
@ -411,7 +412,7 @@ public:
|
|||
private:
|
||||
bool DoExpireCheck(const detail::AttrPtr& attr);
|
||||
|
||||
detail::CompositeHash* table_hash = nullptr;
|
||||
std::unique_ptr<detail::CompositeHash> table_hash;
|
||||
|
||||
// Used to prevent repeated error messages.
|
||||
bool reported_error = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue