WireDecoder: Add overloads for StringValue and Value.

Change-Id: Idb41fd16fec8efc8b984c1a9b4d225829d16e344
StringValue: Add comparison operators.
This commit is contained in:
Peter Johnson
2015-07-04 23:10:59 -07:00
parent a55b6565b8
commit 6aa32e8752
3 changed files with 36 additions and 3 deletions

View File

@@ -102,6 +102,7 @@ bool WireDecoder::ReadType(NT_Type* type) {
*type = NT_RPC;
break;
default:
*type = NT_UNASSIGNED;
m_error = "unrecognized value type";
return false;
}
@@ -109,8 +110,6 @@ bool WireDecoder::ReadType(NT_Type* type) {
}
bool WireDecoder::ReadValue(NT_Type type, NT_Value* value) {
value->type = type;
value->last_change = 0;
switch (type) {
case NT_BOOLEAN: {
unsigned int v;
@@ -188,6 +187,8 @@ bool WireDecoder::ReadValue(NT_Type type, NT_Value* value) {
m_error = "invalid type when trying to read value";
return false;
}
value->type = type;
value->last_change = 0;
return true;
}