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:
Robin Sommer 2013-08-31 11:03:40 -07:00
parent a8ac7d8a5b
commit de5bb65ff7
4 changed files with 4 additions and 38 deletions

View file

@ -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);