summaryrefslogtreecommitdiff
path: root/src/T2DLL/T2NameList.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/T2DLL/T2NameList.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/T2DLL/T2NameList.cpp b/src/T2DLL/T2NameList.cpp
index 44ee91f..8fda1d6 100644
--- a/src/T2DLL/T2NameList.cpp
+++ b/src/T2DLL/T2NameList.cpp
@@ -105,35 +105,35 @@ T2Name* T2NameList::Search(const T2People* people, BOOL isFavorite) const {
T2Name* T2NameList::Search(const CString& str, BOOL isFavorite) const {
LArrayIterator iterator(*this);
- T2Name *result = NULL;
- T2Name *name = NULL;
+ T2Name *theFoundName = NULL;
+ T2Name *theName = NULL;
- while (iterator.Next(&name)) {
- if (name->IsFavorite() == isFavorite && *name == str) {
- result = name;
+ while (iterator.Next(&theName)) {
+ if (theName->IsFavorite() == isFavorite && *theName == str) {
+ theFoundName = theName;
break;
}
}
- return result;
+ return theFoundName;
}
T2Name* T2NameList::FullNameSearch(T2TowerDoc* towerDoc, const CString& str, BOOL isFavorite) const {
LArrayIterator iterator(*this);
- T2Name *result = NULL;
- T2Name *name = NULL;
+ T2Name *theFoundName = NULL;
+ T2Name *theName = NULL;
- while (iterator.Next(&name)) {
+ while (iterator.Next(&theName)) {
CString fullName;
- name->MakeFullName(towerDoc, fullName);
- BOOL nameMatches = (fullName == str);
- if (name->IsFavorite() == isFavorite && nameMatches) {
- result = name;
+ theName->MakeFullName(towerDoc, fullName);
+ BOOL isMatch = (str == fullName);
+ if (theName->IsFavorite() == isFavorite && isMatch) {
+ theFoundName = theName;
break;
}
}
- return result;
+ return theFoundName;
}
void T2NameList::Read(T2Archive& archive) {
@@ -151,8 +151,8 @@ void T2NameList::Write(T2Archive& archive) const {
archive << count;
LArrayIterator iterator(*this);
- T2Name *name;
+ T2Name *theName;
- while (iterator.Next(&name))
- name->Write(archive);
+ while (iterator.Next(&theName))
+ theName->Write(archive);
}