mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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
|
@ -107,15 +107,6 @@ bool BinarySerializationFormat::Read(int* v, const char* tag)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool BinarySerializationFormat::Read(uint8* v, const char* tag)
|
||||
{
|
||||
if ( ! ReadData(v, sizeof(*v)) )
|
||||
return false;
|
||||
|
||||
DBG_LOG(DBG_SERIAL, "Read uint8 %hu [%s]", *v, tag);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BinarySerializationFormat::Read(uint16* v, const char* tag)
|
||||
{
|
||||
if ( ! ReadData(v, sizeof(*v)) )
|
||||
|
@ -310,12 +301,6 @@ bool BinarySerializationFormat::Write(char v, const char* tag)
|
|||
return WriteData(&v, 1);
|
||||
}
|
||||
|
||||
bool BinarySerializationFormat::Write(uint8 v, const char* tag)
|
||||
{
|
||||
DBG_LOG(DBG_SERIAL, "Write uint8 %hu [%s]", v, tag);
|
||||
return WriteData(&v, sizeof(v));
|
||||
}
|
||||
|
||||
bool BinarySerializationFormat::Write(uint16 v, const char* tag)
|
||||
{
|
||||
DBG_LOG(DBG_SERIAL, "Write uint16 %hu [%s]", v, tag);
|
||||
|
@ -462,12 +447,6 @@ bool XMLSerializationFormat::Read(int* v, const char* tag)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool XMLSerializationFormat::Read(uint8* v, const char* tag)
|
||||
{
|
||||
reporter->InternalError("no reading of xml");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool XMLSerializationFormat::Read(uint16* v, const char* tag)
|
||||
{
|
||||
reporter->InternalError("no reading of xml");
|
||||
|
@ -551,13 +530,6 @@ bool XMLSerializationFormat::Write(char v, const char* tag)
|
|||
return WriteElem(tag, "char", &v, 1);
|
||||
}
|
||||
|
||||
bool XMLSerializationFormat::Write(uint8 v, const char* tag)
|
||||
{
|
||||
const char* tmp = fmt("%" PRIu8, v);
|
||||
return WriteElem(tag, "uint8", tmp, strlen(tmp));
|
||||
}
|
||||
|
||||
|
||||
bool XMLSerializationFormat::Write(uint16 v, const char* tag)
|
||||
{
|
||||
const char* tmp = fmt("%" PRIu16, v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue