virtual bool Item (cPlayer * a_pPlayer) { unsigned int Rating = RateCompareString (PlayerName, a_pPlayer->GetName()); if (Rating > 0 && Rating >= BestRating) { BestMatch = a_pPlayer; if( Rating > BestRating ) NumMatches = 0; BestRating = Rating; ++NumMatches; } if (Rating == NameLength) // Perfect match { return false; } return true; }
virtual bool Item (cPlayer * a_pPlayer) { size_t Rating = RateCompareString (m_PlayerName, a_pPlayer->GetName()); if ((Rating > 0) && (Rating >= m_BestRating)) { m_BestMatch = a_pPlayer->GetName(); if (Rating > m_BestRating) { m_NumMatches = 0; } m_BestRating = Rating; ++m_NumMatches; } if (Rating == m_NameLength) // Perfect match { return true; } return false; }