From c2efba6907fab934a04959b9bb644cf7141cc955 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sat, 1 Jul 2023 23:04:04 +0100 Subject: matched T2DLL as well as i can --- src/T2DLL/T2NameList.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/T2DLL/T2NameList.cpp') 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); } -- cgit v1.2.3