diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-01 23:04:04 +0100 |
commit | c2efba6907fab934a04959b9bb644cf7141cc955 (patch) | |
tree | c047244f99870e44a7a5d7e733c2857434c03765 /src/T2DLL/T2MoverModuleList.cpp | |
parent | 1eb8da84d77d0c865623421069ec38bfc7b0d461 (diff) | |
download | t2win-c2efba6907fab934a04959b9bb644cf7141cc955.tar.gz t2win-c2efba6907fab934a04959b9bb644cf7141cc955.zip |
matched T2DLL as well as i can
Diffstat (limited to '')
-rw-r--r-- | src/T2DLL/T2MoverModuleList.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/T2DLL/T2MoverModuleList.cpp b/src/T2DLL/T2MoverModuleList.cpp index f388435..9711ec4 100644 --- a/src/T2DLL/T2MoverModuleList.cpp +++ b/src/T2DLL/T2MoverModuleList.cpp @@ -15,11 +15,11 @@ T2MoverModuleList::T2MoverModuleList() /*virtual*/ T2MoverModuleList::~T2MoverModuleList() { LArrayIterator iterator(*this); - T2MoverModule *moverModule = NULL; + T2MoverModule *theMoverModule = NULL; - while (iterator.Next(&moverModule)) { - if (moverModule) - delete moverModule; + while (iterator.Next(&theMoverModule)) { + if (theMoverModule) + delete theMoverModule; } RemoveItemsAt(mItemCount, 1); @@ -43,11 +43,11 @@ void T2MoverModuleList::AllClear() { /*virtual*/ void T2MoverModuleList::Destruct(T2TowerDoc* towerDoc) { LArrayIterator iterator(*this); - T2MoverModule *moverModule = NULL; + T2MoverModule *theMoverModule = NULL; - while (iterator.Next(&moverModule)) { - if (moverModule) - RemoveModule(towerDoc, moverModule); + while (iterator.Next(&theMoverModule)) { + if (theMoverModule) + RemoveModule(towerDoc, theMoverModule); } } @@ -75,10 +75,10 @@ void T2MoverModuleList::AllClear() { archive << mItemCount; LArrayIterator iterator(*this); - T2MoverModule *moverModule = NULL; + T2MoverModule *theMoverModule = NULL; - while (iterator.Next(&moverModule)) - moverModule->Save(archive); + while (iterator.Next(&theMoverModule)) + theMoverModule->Save(archive); } /*virtual*/ T2MoverModule* T2MoverModuleList::ConstructModule() { @@ -96,22 +96,22 @@ unsigned int T2MoverModuleList::GetItemCount() { } /*static*/ T2MoverModuleList* T2MoverModuleList::ReadMMList(T2Archive& archive, T2TowerDoc* towerDoc) { - T2MoverModuleList *list = NULL; + T2MoverModuleList *theList = NULL; - DWORD code; - archive >> code; + DWORD classID; + archive >> classID; - if (code == '_MML') - list = new T2MoverModuleList; - else if (code == 'ElML') - list = new T2ElvModuleList; - else if (code == 'StML') - list = new T2StairModuleList; + if (classID == '_MML') + theList = new T2MoverModuleList; + else if (classID == 'ElML') + theList = new T2ElvModuleList; + else if (classID == 'StML') + theList = new T2StairModuleList; - if (list) - list->Read(archive, towerDoc); + if (theList) + theList->Read(archive, towerDoc); - return list; + return theList; } /*static*/ void T2MoverModuleList::WriteMMList(T2MoverModuleList* list, T2Archive& archive) { |