From f36826605fb20ea60331d18674e7e7c3257a2de8 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 13 Mar 2018 17:30:33 -0500 Subject: [PATCH] simobject, dictionary, stringtable, and taml clarificationsand cleanups --- Engine/source/console/simFieldDictionary.cpp | 24 ++++++++++---------- Engine/source/console/simObject.cpp | 6 ++--- Engine/source/core/stringTable.cpp | 2 +- Engine/source/persistence/taml/taml.cpp | 8 +++---- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Engine/source/console/simFieldDictionary.cpp b/Engine/source/console/simFieldDictionary.cpp index f68a8689b..2c9f474ae 100644 --- a/Engine/source/console/simFieldDictionary.cpp +++ b/Engine/source/console/simFieldDictionary.cpp @@ -245,17 +245,17 @@ void SimFieldDictionary::writeFields(SimObject *obj, Stream &stream, U32 tabStop const AbstractClassRep::FieldList &list = obj->getFieldList(); Vector 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 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); diff --git a/Engine/source/console/simObject.cpp b/Engine/source/console/simObject.cpp index c4b6848c9..c3044df0e 100644 --- a/Engine/source/console/simObject.cpp +++ b/Engine/source/console/simObject.cpp @@ -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 { diff --git a/Engine/source/core/stringTable.cpp b/Engine/source/core/stringTable.cpp index 9a71603ae..cbdfaec40 100644 --- a/Engine/source/core/stringTable.cpp +++ b/Engine/source/core/stringTable.cpp @@ -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); diff --git a/Engine/source/persistence/taml/taml.cpp b/Engine/source/persistence/taml/taml.cpp index f364ed0ce..b9144e8ed 100644 --- a/Engine/source/persistence/taml/taml.cpp +++ b/Engine/source/persistence/taml/taml.cpp @@ -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");