Remove redundant checks for 'ramrandom'; the code is checking a boolean,

then calling a method and checking the boolean again.
This commit is contained in:
Stephen Anthony 2017-08-06 13:30:45 -02:30
parent 18568cfbeb
commit e2b78b6df7
2 changed files with 2 additions and 10 deletions

View File

@ -74,11 +74,7 @@ CartridgeBUS::CartridgeBUS(const BytePtr& image, uInt32 size,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeBUS::reset()
{
// Initialize RAM
if(mySettings.getBool("ramrandom"))
initializeRAM(myBUSRAM+2048, 8192-2048);
else
memset(myBUSRAM+2048, 0, 8192-2048);
initializeRAM(myBUSRAM+2048, 8192-2048);
// Update cycles to the current system cycles
mySystemCycles = mySystem->cycles();

View File

@ -73,11 +73,7 @@ CartridgeCDF::CartridgeCDF(const BytePtr& image, uInt32 size,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeCDF::reset()
{
// Initialize RAM
if(mySettings.getBool("ramrandom"))
initializeRAM(myCDFRAM+2048, 8192-2048);
else
memset(myCDFRAM+2048, 0, 8192-2048);
initializeRAM(myCDFRAM+2048, 8192-2048);
// Update cycles to the current system cycles
myAudioCycles = mySystem->cycles();