summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2PeoplePtrList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/T2DLL/T2PeoplePtrList.cpp')
-rw-r--r--src/T2DLL/T2PeoplePtrList.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/T2DLL/T2PeoplePtrList.cpp b/src/T2DLL/T2PeoplePtrList.cpp
index 315d664..40e1f22 100644
--- a/src/T2DLL/T2PeoplePtrList.cpp
+++ b/src/T2DLL/T2PeoplePtrList.cpp
@@ -15,22 +15,22 @@ T2PeoplePtrList::T2PeoplePtrList(int count)
void T2PeoplePtrList::Init(unsigned int count) {
if (count > 0) {
AdjustAllocation(count);
- T2People *zero = NULL;
- InsertItemsAt(count, 1, &zero);
+ T2People *nullPeople = NULL;
+ InsertItemsAt(count, 1, &nullPeople);
}
}
BOOL T2PeoplePtrList::Add(T2People* people) {
- BOOL result = false;
- T2People *zero = NULL;
+ BOOL done = false;
+ T2People *nullPeople = NULL;
- int index;
- if (GetPeopleIndex(zero, index)) {
- AssignItemsAt(1, index, &people);
- result = true;
+ int theIndex;
+ if (GetPeopleIndex(nullPeople, theIndex)) {
+ AssignItemsAt(1, theIndex, &people);
+ done = true;
}
- return result;
+ return done;
}
T2People* T2PeoplePtrList::GetItemAt(int index) const {
@@ -53,21 +53,21 @@ BOOL T2PeoplePtrList::GetPeopleIndex(T2People* people, int& outIndex) const {
}
BOOL T2PeoplePtrList::HasSpace() const {
- int index;
- T2People *zero = NULL;
- return GetPeopleIndex(zero, index);
+ int theIndex;
+ T2People *nullPeople = NULL;
+ return GetPeopleIndex(nullPeople, theIndex);
}
void T2PeoplePtrList::Clear() {
- T2People *zero = NULL;
- AssignItemsAt(mItemCount, 1, &zero);
+ T2People *nullPeople = NULL;
+ AssignItemsAt(mItemCount, 1, &nullPeople);
}
void T2PeoplePtrList::Clear(T2People* people) {
- int index;
- if (GetPeopleIndex(people, index)) {
- T2People *zero = NULL;
- AssignItemsAt(1, index, &zero);
+ int theIndex;
+ if (GetPeopleIndex(people, theIndex)) {
+ T2People *nullPeople = NULL;
+ AssignItemsAt(1, theIndex, &nullPeople);
}
}
@@ -122,27 +122,27 @@ void T2PeoplePtrList::IncEstimate(int value) {
}
BOOL T2PeoplePtrList::InSameTenant(unsigned int tenantID) const {
- BOOL result = true;
+ BOOL inSameTenant = true;
LArrayIterator iterator(*this);
- T2People *people;
+ T2People *thePeople;
- while (result && iterator.Next(&people)) {
- if (people && people->GetCurTenantID() != tenantID)
- result = false;
+ while (inSameTenant && iterator.Next(&thePeople)) {
+ if (thePeople && thePeople->GetCurTenantID() != tenantID)
+ inSameTenant = false;
}
- return result;
+ return inSameTenant;
}
void T2PeoplePtrList::LoadSelf(T2Archive& archive, T2PeopleArrayList* list) {
- int count;
- archive >> count;
- Init(count);
+ int numPeople;
+ archive >> numPeople;
+ Init(numPeople);
- for (unsigned int i = 0; i < count; i++) {
+ for (unsigned int i = 0; i < numPeople; i++) {
unsigned int peopleID;
archive >> peopleID;
- if (peopleID)
+ if (list)
Add(list->FindPeople(peopleID));
}
}