Implement a debug Journal

This commit is contained in:
Nik Bougalis
2016-01-27 11:22:54 -08:00
parent 57d6ab091c
commit 5ac744ff66
28 changed files with 243 additions and 338 deletions

View File

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