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

@ -131,7 +131,6 @@ bool Value::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:
@ -192,7 +191,6 @@ bool Value::Read(SerializationFormat* fmt)
return fmt->Read(&val.int_val, "int");
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
return fmt->Read(&val.uint_val, "uint");
case zeek::TYPE_PORT: {
@ -339,7 +337,6 @@ bool Value::Write(SerializationFormat* fmt) const
return fmt->Write(val.int_val, "int");
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
return fmt->Write(val.uint_val, "uint");
case zeek::TYPE_PORT:
@ -452,7 +449,6 @@ zeek::Val* Value::ValueToVal(const std::string& source, const Value* val, bool&
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

@ -90,7 +90,6 @@ bool Ascii::Describe(ODesc* desc, threading::Value* val, const string& name) con
break;
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
desc->Add(val->val.uint_val);
break;
@ -260,7 +259,6 @@ threading::Value* Ascii::ParseValue(const string& s, const string& name, zeek::T
break;
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
val->val.uint_val = strtoull(start, &end, 10);
if ( CheckNumberError(start, end) )
goto parse_error;

View file

@ -106,7 +106,6 @@ void JSON::BuildJSON(NullDoubleWriter& writer, Value* val, const std::string& na
break;
case zeek::TYPE_COUNT:
case zeek::TYPE_COUNTER:
writer.Uint64(val->val.uint_val);
break;