mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Implement a debug Journal
This commit is contained in:
@@ -148,46 +148,6 @@ int Serializer::addFieldID (int type, int name)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Serializer::getFieldID (int& type, int& name, int offset) const
|
||||
{
|
||||
if (!get8 (type, offset))
|
||||
{
|
||||
WriteLog (lsWARNING, Serializer) << "gFID: unable to get type";
|
||||
return false;
|
||||
}
|
||||
|
||||
name = type & 15;
|
||||
type >>= 4;
|
||||
|
||||
if (type == 0)
|
||||
{
|
||||
// uncommon type
|
||||
if (!get8 (type, ++offset))
|
||||
return false;
|
||||
|
||||
if ((type == 0) || (type < 16))
|
||||
{
|
||||
WriteLog (lsWARNING, Serializer) << "gFID: uncommon type out of range " << type;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (name == 0)
|
||||
{
|
||||
// uncommon name
|
||||
if (!get8 (name, ++offset))
|
||||
return false;
|
||||
|
||||
if ((name == 0) || (name < 16))
|
||||
{
|
||||
WriteLog (lsWARNING, Serializer) << "gFID: uncommon name out of range " << name;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int Serializer::add8 (unsigned char byte)
|
||||
{
|
||||
int ret = mData.size ();
|
||||
|
||||
Reference in New Issue
Block a user