simobject, dictionary, stringtable, and taml clarificationsand cleanups

This commit is contained in:
Azaezel 2018-03-13 17:30:33 -05:00
parent f1c397e055
commit 87207e0a97
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
{

View file

@ -232,7 +232,7 @@ void _StringTable::resize(const U32 _newSize)
walk = head;
while(walk) {
U32 key;
Node *temp = walk;
temp = walk;
walk = walk->next;
key = hashString(temp->val);

View file

@ -1241,8 +1241,8 @@ ImplementEnumType(_TamlFormatMode,
// *************************************************************
// Generate the engine type elements.
TiXmlComment* pComment = new TiXmlComment("Type Elements");
pSchemaElement->LinkEndChild(pComment);
TiXmlComment* tComment = new TiXmlComment("Type Elements");
pSchemaElement->LinkEndChild(tComment);
for (AbstractClassRep* pType = pRootType; pType != NULL; pType = pType->getNextClass())
{
// Add type.
@ -1260,8 +1260,8 @@ ImplementEnumType(_TamlFormatMode,
{
// Add complex type comment.
dSprintf(buffer, sizeof(buffer), " %s Type ", pType->getClassName());
TiXmlComment* pComment = new TiXmlComment(buffer);
pSchemaElement->LinkEndChild(pComment);
TiXmlComment* ctComment = new TiXmlComment(buffer);
pSchemaElement->LinkEndChild(ctComment);
// Add complex type.
TiXmlElement* pComplexTypeElement = new TiXmlElement("xs:complexType");