mirror of
https://github.com/TASEmulators/desmume.git
synced 2025-12-28 05:34:34 +00:00
NDSSystem.cpp: In GameHacks::reset(), have the loop for deleting cheats objects match the loop in GameHacks::execute() for better code consistency.
This commit is contained in:
parent
38a674d455
commit
b500fb5419
@ -3532,7 +3532,6 @@ void TCommonSettings::GameHacks::clear()
|
||||
void TCommonSettings::GameHacks::execute()
|
||||
{
|
||||
const size_t cheatCount = flags.cheats.size();
|
||||
|
||||
for (size_t i = 0; i < cheatCount; i++)
|
||||
{
|
||||
flags.cheats[i]->Run();
|
||||
@ -3541,12 +3540,11 @@ void TCommonSettings::GameHacks::execute()
|
||||
|
||||
void TCommonSettings::GameHacks::GameHacksFlags::reset()
|
||||
{
|
||||
const size_t cheatCount = cheats.size();
|
||||
|
||||
overclock = false;
|
||||
stylusjitter = false;
|
||||
|
||||
for (int i = (int)cheatCount - 1; i > 0; i--)
|
||||
|
||||
const size_t cheatCount = cheats.size();
|
||||
for (size_t i = 0; i < cheatCount; i++)
|
||||
{
|
||||
delete cheats[i];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user