simobject, dictionary, stringtable, and taml clarificationsand cleanups

This commit is contained in:
Azaezel 2018-03-13 17:30:33 -05:00
parent 9dd9d2f9b7
commit f36826605f
4 changed files with 20 additions and 20 deletions

View file

@ -245,17 +245,17 @@ void SimFieldDictionary::writeFields(SimObject *obj, Stream &stream, U32 tabStop
const AbstractClassRep::FieldList &list = obj->getFieldList();
Vector<Entry *> flist(__FILE__, __LINE__);
for (U32 i = 0; i < HashTableSize; i++)
for (U32 curEntry = 0; curEntry < HashTableSize; curEntry++)
{
for (Entry *walk = mHashTable[i]; walk; walk = walk->next)
for (Entry *walk = mHashTable[curEntry]; walk; walk = walk->next)
{
// make sure we haven't written this out yet:
U32 i;
for (i = 0; i < list.size(); i++)
if (list[i].pFieldname == walk->slotName)
U32 curField;
for (curField = 0; curField < list.size(); curField++)
if (list[curField].pFieldname == walk->slotName)
break;
if (i != list.size())
if (curField != list.size())
continue;
@ -293,17 +293,17 @@ void SimFieldDictionary::printFields(SimObject *obj)
char expandedBuffer[4096];
Vector<Entry *> flist(__FILE__, __LINE__);
for (U32 i = 0; i < HashTableSize; i++)
for (U32 curEntry = 0; curEntry < HashTableSize; curEntry++)
{
for (Entry *walk = mHashTable[i]; walk; walk = walk->next)
for (Entry *walk = mHashTable[curEntry]; walk; walk = walk->next)
{
// make sure we haven't written this out yet:
U32 i;
for (i = 0; i < list.size(); i++)
if (list[i].pFieldname == walk->slotName)
U32 curField;
for (curField = 0; curField < list.size(); curField++)
if (list[curField].pFieldname == walk->slotName)
break;
if (i != list.size())
if (curField != list.size())
continue;
flist.push_back(walk);

View file

@ -529,17 +529,17 @@ void SimObject::onTamlCustomRead(TamlCustomNodes const& customNodes)
for (TamlCustomFieldVector::const_iterator fieldItr = fields.begin(); fieldItr != fields.end(); ++fieldItr)
{
// Fetch field.
const TamlCustomField* pField = *fieldItr;
const TamlCustomField* cField = *fieldItr;
// Fetch field name.
StringTableEntry fieldName = pField->getFieldName();
StringTableEntry fieldName = cField->getFieldName();
const AbstractClassRep::Field* field = findField(fieldName);
// Check common fields.
if (field)
{
setDataField(fieldName, buf, pField->getFieldValue());
setDataField(fieldName, buf, cField->getFieldValue());
}
else
{