mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Removing the "uint8*" methods from SerializationFormat.
They conflict with the "char" version, so that other classes would now pick the wrong one. Added a bit of casting to HLL to use the "char" versions instead.
This commit is contained in:
parent
a8ac7d8a5b
commit
de5bb65ff7
4 changed files with 4 additions and 38 deletions
|
@ -161,7 +161,7 @@ bool CardinalityCounter::Serialize(SerialInfo* info) const
|
|||
valid &= SERIALIZE(alpha_m);
|
||||
|
||||
for ( unsigned int i = 0; i < m; i++ )
|
||||
valid &= SERIALIZE(buckets[i]);
|
||||
valid &= SERIALIZE((char)buckets[i]);
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
@ -183,8 +183,9 @@ CardinalityCounter* CardinalityCounter::Unserialize(UnserialInfo* info)
|
|||
|
||||
for ( unsigned int i = 0; i < m; i++ )
|
||||
{
|
||||
uint8_t* currbucket = buckets + i;
|
||||
valid &= UNSERIALIZE(currbucket);
|
||||
char c;
|
||||
valid &= UNSERIALIZE(&c);
|
||||
buckets[i] = (uint8)c;
|
||||
}
|
||||
|
||||
return valid ? c : 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue