mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
GeckoCode: Provide operator== and operator!= overloads
Same thing but allows both GeckoCode and Code to be utilized directly without predicates for equality/inequality in stardard algorithms The size check for std::vectors is unnecessary, as this is built into std::vector's operator==
This commit is contained in:
@ -275,8 +275,8 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
|
||||
for (const GeckoCode& code : gcodes)
|
||||
{
|
||||
// only add codes which do not already exist
|
||||
std::vector<GeckoCode>::const_iterator existing_gcodes_iter = m_gcodes.begin(),
|
||||
existing_gcodes_end = m_gcodes.end();
|
||||
auto existing_gcodes_iter = m_gcodes.begin();
|
||||
auto existing_gcodes_end = m_gcodes.end();
|
||||
for (;; ++existing_gcodes_iter)
|
||||
{
|
||||
if (existing_gcodes_end == existing_gcodes_iter)
|
||||
@ -287,7 +287,7 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
|
||||
}
|
||||
|
||||
// code exists
|
||||
if (existing_gcodes_iter->Compare(code))
|
||||
if (*existing_gcodes_iter == code)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user