Completely remove all traces of the COUNTER type.

Relates to GH-1095
This commit is contained in:
Johanna Amann 2020-07-30 12:10:54 -07:00
parent 01fa5611ef
commit 417a6eb1e9
28 changed files with 79 additions and 140 deletions

View file

@ -800,7 +800,6 @@ bool Manager::IsCompatibleType(zeek::Type* t, bool atomic_only)
case zeek::TYPE_BOOL:
case zeek::TYPE_INT:
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
case zeek::TYPE_PORT:
case zeek::TYPE_SUBNET:
case zeek::TYPE_ADDR:
@ -1919,7 +1918,6 @@ int Manager::GetValueLength(const Value* val) const
break;
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
length += sizeof(val->val.uint_val);
break;
@ -2015,7 +2013,6 @@ int Manager::CopyValue(char *data, const int startpos, const Value* val) const
return sizeof(val->val.int_val);
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
memcpy(data+startpos, (const void*) &(val->val.uint_val), sizeof(val->val.uint_val));
return sizeof(val->val.uint_val);
@ -2204,7 +2201,6 @@ zeek::Val* Manager::ValueToVal(const Stream* i, const Value* val, zeek::Type* re
return zeek::val_mgr->Int(val->val.int_val).release();
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
return zeek::val_mgr->Count(val->val.int_val).release();
case zeek::TYPE_DOUBLE:

View file

@ -159,7 +159,6 @@ threading::Value* Benchmark::EntryToVal(zeek::TypeTag type, zeek::TypeTag subtyp
break;
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
val->val.uint_val = random();
break;

View file

@ -183,7 +183,6 @@ Value* SQLite::EntryToVal(sqlite3_stmt *st, const threading::Field *field, int p
break;
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
val->val.uint_val = sqlite3_column_int64(st, pos);
break;