From 2369645a5a7bc20685ae83f21c6df9bc90c44b19 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Mon, 12 Mar 2018 03:58:19 -0500 Subject: [PATCH] simset::objectList to simset::mObjectList --- Engine/source/console/simManager.cpp | 2 +- Engine/source/console/simSet.cpp | 56 +++++++++---------- Engine/source/console/simSet.h | 30 +++++----- .../forest/editor/forestBrushElement.cpp | 4 +- Engine/source/scene/simPath.cpp | 2 +- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/Engine/source/console/simManager.cpp b/Engine/source/console/simManager.cpp index 4f12fa85f..fc8a77edd 100644 --- a/Engine/source/console/simManager.cpp +++ b/Engine/source/console/simManager.cpp @@ -612,6 +612,6 @@ void SimDataBlockGroup::sort() if(mLastModifiedKey != SimDataBlock::getNextModifiedKey()) { mLastModifiedKey = SimDataBlock::getNextModifiedKey(); - dQsort(objectList.address(),objectList.size(),sizeof(SimObject *),compareModifiedKey); + dQsort(mObjectList.address(), mObjectList.size(),sizeof(SimObject *),compareModifiedKey); } } diff --git a/Engine/source/console/simSet.cpp b/Engine/source/console/simSet.cpp index c44b09c36..718e5f158 100644 --- a/Engine/source/console/simSet.cpp +++ b/Engine/source/console/simSet.cpp @@ -118,7 +118,7 @@ IMPLEMENT_CALLBACK( SimSet, onObjectRemoved, void, ( SimObject* object ), ( obje SimSet::SimSet() { - VECTOR_SET_ASSOCIATION( objectList ); + VECTOR_SET_ASSOCIATION(mObjectList); mMutex = Mutex::createMutex(); } @@ -139,7 +139,7 @@ void SimSet::addObject( SimObject* obj ) lock(); - const bool added = objectList.pushBack( obj ); + const bool added = mObjectList.pushBack( obj ); if( added ) deleteNotify( obj ); @@ -159,7 +159,7 @@ void SimSet::removeObject( SimObject* obj ) { lock(); - const bool removed = objectList.remove( obj ); + const bool removed = mObjectList.remove( obj ); if( removed ) clearNotify( obj ); @@ -182,7 +182,7 @@ void SimSet::pushObject( SimObject* obj ) lock(); - bool added = objectList.pushBackForce( obj ); + bool added = mObjectList.pushBackForce( obj ); if( added ) deleteNotify( obj ); @@ -200,15 +200,15 @@ void SimSet::pushObject( SimObject* obj ) void SimSet::popObject() { - if( objectList.empty() ) + if(mObjectList.empty() ) { AssertWarn(false, "Stack underflow in SimSet::popObject"); return; } lock(); - SimObject* object = objectList.last(); - objectList.pop_back(); + SimObject* object = mObjectList.last(); + mObjectList.pop_back(); clearNotify( object ); unlock(); @@ -223,7 +223,7 @@ void SimSet::popObject() void SimSet::scriptSort( const String &scriptCallbackFn ) { lock(); - objectList.scriptSort( scriptCallbackFn ); + mObjectList.scriptSort( scriptCallbackFn ); unlock(); } @@ -303,8 +303,8 @@ bool SimSet::reOrder( SimObject *obj, SimObject *target ) if ( itrS != (end()-1) ) { // remove object from its current location and push to back of list - objectList.erase(itrS); - objectList.push_back(obj); + mObjectList.erase(itrS); + mObjectList.push_back(obj); } } else @@ -314,12 +314,12 @@ bool SimSet::reOrder( SimObject *obj, SimObject *target ) // target must be in list return false; - objectList.erase(itrS); + mObjectList.erase(itrS); // once itrS has been erased, itrD won't be pointing at the // same place anymore - re-find... itrD = find(begin(),end(),target); - objectList.insert(itrD, obj); + mObjectList.insert(itrD, obj); } return true; @@ -340,15 +340,15 @@ void SimSet::onRemove() MutexHandle handle; handle.lock( mMutex ); - if( !objectList.empty() ) + if( !mObjectList.empty() ) { - objectList.sortId(); + mObjectList.sortId(); // This backwards iterator loop doesn't work if the // list is empty, check the size first. - for( SimObjectList::iterator ptr = objectList.end() - 1; - ptr >= objectList.begin(); ptr -- ) + for( SimObjectList::iterator ptr = mObjectList.end() - 1; + ptr >= mObjectList.begin(); ptr -- ) clearNotify( *ptr ); } @@ -417,8 +417,8 @@ void SimSet::deleteAllObjects() lock(); while( !empty() ) { - SimObject* object = objectList.last(); - objectList.pop_back(); + SimObject* object = mObjectList.last(); + mObjectList.pop_back(); object->deleteObject(); } @@ -536,7 +536,7 @@ SimObject* SimSet::findObjectByLineNumber(const char* fileName, S32 declarationL SimObject* SimSet::getRandom() { if (size() > 0) - return objectList[mRandI(0, size() - 1)]; + return mObjectList[mRandI(0, size() - 1)]; return NULL; } @@ -640,7 +640,7 @@ void SimGroup::_addObject( SimObject* obj, bool forcePushBack ) if( obj->getGroup() ) obj->getGroup()->removeObject( obj ); - if( forcePushBack ? objectList.pushBack( obj ) : objectList.pushBackForce( obj ) ) + if( forcePushBack ? mObjectList.pushBack( obj ) : mObjectList.pushBackForce( obj ) ) { mNameDictionary.insert( obj ); obj->mGroup = this; @@ -685,7 +685,7 @@ void SimGroup::_removeObjectNoLock( SimObject* obj ) obj->onGroupRemove(); mNameDictionary.remove( obj ); - objectList.remove( obj ); + mObjectList.remove( obj ); obj->mGroup = 0; getSetModificationSignal().trigger( SetObjectRemoved, this, obj ); @@ -709,14 +709,14 @@ void SimGroup::popObject() MutexHandle handle; handle.lock( mMutex ); - if( objectList.empty() ) + if(mObjectList.empty() ) { AssertWarn( false, "SimGroup::popObject - Stack underflow" ); return; } - SimObject* object = objectList.last(); - objectList.pop_back(); + SimObject* object = mObjectList.last(); + mObjectList.pop_back(); object->onGroupRemove(); object->mGroup = NULL; @@ -736,9 +736,9 @@ void SimGroup::popObject() void SimGroup::onRemove() { lock(); - if( !objectList.empty() ) + if( !mObjectList.empty() ) { - objectList.sortId(); + mObjectList.sortId(); clear(); } SimObject::onRemove(); @@ -752,10 +752,10 @@ void SimGroup::clear() lock(); while( size() > 0 ) { - SimObject* object = objectList.last(); + SimObject* object = mObjectList.last(); object->onGroupRemove(); - objectList.pop_back(); + mObjectList.pop_back(); mNameDictionary.remove( object ); object->mGroup = 0; diff --git a/Engine/source/console/simSet.h b/Engine/source/console/simSet.h index 9712e7945..7f49b03ed 100644 --- a/Engine/source/console/simSet.h +++ b/Engine/source/console/simSet.h @@ -114,7 +114,7 @@ class SimSet : public SimObject, public TamlChildren protected: - SimObjectList objectList; + SimObjectList mObjectList; void *mMutex; /// Signal that is triggered when objects are added or removed from the set. @@ -144,14 +144,14 @@ class SimSet : public SimObject, public TamlChildren /// typedef SimObjectList::iterator iterator; typedef SimObjectList::value_type value; - SimObject* front() { return objectList.front(); } - SimObject* first() { return objectList.first(); } - SimObject* last() { return objectList.last(); } - bool empty() const { return objectList.empty(); } - S32 size() const { return objectList.size(); } - iterator begin() { return objectList.begin(); } - iterator end() { return objectList.end(); } - value operator[] (S32 index) { return objectList[U32(index)]; } + SimObject* front() { return mObjectList.front(); } + SimObject* first() { return mObjectList.first(); } + SimObject* last() { return mObjectList.last(); } + bool empty() const { return mObjectList.empty(); } + S32 size() const { return mObjectList.size(); } + iterator begin() { return mObjectList.begin(); } + iterator end() { return mObjectList.end(); } + value operator[] (S32 index) { return mObjectList[U32(index)]; } inline iterator find( iterator first, iterator last, SimObject *obj) { return ::find(first, last, obj); } @@ -163,7 +163,7 @@ class SimSet : public SimObject, public TamlChildren virtual bool reOrder( SimObject *obj, SimObject *target=0 ); /// Return the object at the given index. - SimObject* at(S32 index) const { return objectList.at(index); } + SimObject* at(S32 index) const { return mObjectList.at(index); } /// Remove all objects from this set. virtual void clear(); @@ -263,7 +263,7 @@ class SimSet : public SimObject, public TamlChildren #ifdef TORQUE_DEBUG_GUARD inline void _setVectorAssoc( const char *file, const U32 line ) { - objectList.setFileAssociation( file, line ); + mObjectList.setFileAssociation( file, line ); } #endif @@ -324,9 +324,9 @@ void SimSet::findObjectByType( Vector &foundObjects ) // Loop through our child objects. - SimObjectList::iterator itr = objectList.begin(); + SimObjectList::iterator itr = mObjectList.begin(); - for ( ; itr != objectList.end(); itr++ ) + for ( ; itr != mObjectList.end(); itr++ ) { curObj = dynamic_cast( *itr ); curSet = dynamic_cast( *itr ); @@ -358,9 +358,9 @@ void SimSet::findObjectByCallback( bool ( *fn )( T* ), Vector &foundObjects // Loop through our child objects. - SimObjectList::iterator itr = objectList.begin(); + SimObjectList::iterator itr = mObjectList.begin(); - for ( ; itr != objectList.end(); itr++ ) + for ( ; itr != mObjectList.end(); itr++ ) { curObj = dynamic_cast( *itr ); curSet = dynamic_cast( *itr ); diff --git a/Engine/source/forest/editor/forestBrushElement.cpp b/Engine/source/forest/editor/forestBrushElement.cpp index f61834c9e..bfdedd2b8 100644 --- a/Engine/source/forest/editor/forestBrushElement.cpp +++ b/Engine/source/forest/editor/forestBrushElement.cpp @@ -172,8 +172,8 @@ SimGroup* ForestBrush::getGroup() bool ForestBrush::containsItemData( const ForestItemData *inData ) { - SimObjectList::iterator iter = objectList.begin(); - for ( ; iter != objectList.end(); iter++ ) + SimObjectList::iterator iter = mObjectList.begin(); + for ( ; iter != mObjectList.end(); iter++ ) { ForestBrushElement *pElement = dynamic_cast(*iter); diff --git a/Engine/source/scene/simPath.cpp b/Engine/source/scene/simPath.cpp index e3769df3c..2145af3cc 100644 --- a/Engine/source/scene/simPath.cpp +++ b/Engine/source/scene/simPath.cpp @@ -194,7 +194,7 @@ void Path::onRemove() /// Sort the markers objects into sequence order void Path::sortMarkers() { - dQsort(objectList.address(), objectList.size(), sizeof(SimObject*), cmpPathObject); + dQsort(mObjectList.address(), mObjectList.size(), sizeof(SimObject*), cmpPathObject); } void Path::updatePath()