Val: eliminate the "CompHash.h" include

This commit is contained in:
Max Kellermann 2020-02-11 10:35:34 +01:00
parent 4aac78cf29
commit 728184ea93
4 changed files with 10 additions and 3 deletions

View file

@ -3,6 +3,7 @@
#include <memory> #include <memory>
#include "OpaqueVal.h" #include "OpaqueVal.h"
#include "CompHash.h"
#include "NetVar.h" #include "NetVar.h"
#include "Reporter.h" #include "Reporter.h"
#include "Scope.h" #include "Scope.h"

View file

@ -2,6 +2,7 @@
#include "zeek-config.h" #include "zeek-config.h"
#include "CompHash.h"
#include "Expr.h" #include "Expr.h"
#include "Event.h" #include "Event.h"
#include "Frame.h" #include "Frame.h"

View file

@ -14,6 +14,7 @@
#include <stdlib.h> #include <stdlib.h>
#include "Attr.h" #include "Attr.h"
#include "CompHash.h"
#include "Dict.h" #include "Dict.h"
#include "Net.h" #include "Net.h"
#include "File.h" #include "File.h"
@ -2555,6 +2556,11 @@ unsigned int TableVal::MemoryAllocation() const
+ table_hash->MemoryAllocation(); + table_hash->MemoryAllocation();
} }
HashKey* TableVal::ComputeHash(const Val* index) const
{
return table_hash->ComputeHash(index, 1);
}
vector<RecordVal*> RecordVal::parse_time_records; vector<RecordVal*> RecordVal::parse_time_records;
RecordVal::RecordVal(RecordType* t, bool init_fields) : Val(t) RecordVal::RecordVal(RecordType* t, bool init_fields) : Val(t)

View file

@ -3,7 +3,6 @@
#pragma once #pragma once
#include "Type.h" #include "Type.h"
#include "CompHash.h"
#include "BroString.h" #include "BroString.h"
#include "Timer.h" #include "Timer.h"
#include "Notifier.h" #include "Notifier.h"
@ -698,6 +697,7 @@ protected:
}; };
class CompositeHash; class CompositeHash;
class HashKey;
class Frame; class Frame;
class TableVal : public Val, public notifier::Modifiable { class TableVal : public Val, public notifier::Modifiable {
@ -814,8 +814,7 @@ public:
timer = 0; timer = 0;
} }
HashKey* ComputeHash(const Val* index) const HashKey* ComputeHash(const Val* index) const;
{ return table_hash->ComputeHash(index, 1); }
notifier::Modifiable* Modifiable() override { return this; } notifier::Modifiable* Modifiable() override { return this; }