summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2TenantArrayList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/T2TenantArrayList.cpp')
-rw-r--r--src/T2DLL/T2TenantArrayList.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/T2DLL/T2TenantArrayList.cpp b/src/T2DLL/T2TenantArrayList.cpp
index be01aeb..f6cb81d 100644
--- a/src/T2DLL/T2TenantArrayList.cpp
+++ b/src/T2DLL/T2TenantArrayList.cpp
@@ -57,27 +57,27 @@ T2Tenant* T2TenantArrayList::GetTenantByPID(DWORD pluginID) {
}
T2Tenant* T2TenantArrayList::FindUnusedTenant() {
- T2Tenant *result = NULL;
+ T2Tenant *theUnusedTenant = NULL;
LArrayIterator iterator(*this);
- T2TenantArray *tenantArray = NULL;
+ T2TenantArray *theTenantArray = NULL;
- while (!result && iterator.Next(&tenantArray)) {
- result = tenantArray->FindUnusedTenant();
+ while (!theUnusedTenant && iterator.Next(&theTenantArray)) {
+ theUnusedTenant = theTenantArray->FindUnusedTenant();
}
- if (!result) {
+ if (!theUnusedTenant) {
unsigned int newStartID = 1000;
- if (tenantArray)
- newStartID = tenantArray->GetStartID() + T2TenantArray::kGroupSize;
+ if (theTenantArray)
+ newStartID = theTenantArray->GetStartID() + T2TenantArray::kGroupSize;
- tenantArray = new T2TenantArray(newStartID);
- if (tenantArray) {
- Add(tenantArray);
- result = tenantArray->FindUnusedTenant();
+ theTenantArray = new T2TenantArray(newStartID);
+ if (theTenantArray) {
+ Add(theTenantArray);
+ theUnusedTenant = theTenantArray->FindUnusedTenant();
}
}
- return result;
+ return theUnusedTenant;
}
void T2TenantArrayList::DispatchIdle(T2TowerDoc* towerDoc) {
@@ -109,14 +109,14 @@ void T2TenantArrayList::BreakoutEmergency(T2TowerDoc* towerDoc) {
}
int T2TenantArrayList::CalcMentenanceCost(T2TowerDoc* towerDoc) const {
- int cost = 0;
+ int theCost = 0;
LArrayIterator iterator(*this);
- T2TenantArray *tenantArray;
+ T2TenantArray *theTenantArray;
- while (iterator.Next(&tenantArray))
- cost += tenantArray->CalcMentenanceCost(towerDoc);
+ while (iterator.Next(&theTenantArray))
+ theCost += theTenantArray->CalcMentenanceCost(towerDoc);
- return cost;
+ return theCost;
}
LArray* T2TenantArrayList::MakeTenantList(int type) {
@@ -177,11 +177,11 @@ void T2TenantArrayList::Read(T2Archive& archive, T2TowerDoc* towerDoc) {
startID += T2TenantArray::kGroupSize;
}
- LArrayIterator iterator(*this);
- T2TenantArray *tenantArray;
+ LArrayIterator iter(*this);
+ T2TenantArray *theTenantArray;
- while (iterator.Next(&tenantArray))
- tenantArray->Read(archive, towerDoc);
+ while (iter.Next(&theTenantArray))
+ theTenantArray->Read(archive, towerDoc);
}
void T2TenantArrayList::Write(T2Archive& archive) {