trying to fix CLANG warning

This commit is contained in:
thrust26 2020-11-10 09:03:28 +01:00
parent 3c5c81df0d
commit 14952430ad
1 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ CartridgeEnhanced::CartridgeEnhanced(const ByteBuffer& image, size_t size,
void CartridgeEnhanced::install(System& system)
{
// limit banked RAM size to the size of one RAM bank
const uInt32 ramSize = myRamBankCount > 0 ? 1 << (myBankShift - 1) : uInt32(myRamSize);
const uInt16 ramSize = myRamBankCount > 0 ? 1 << (myBankShift - 1) : uInt16(myRamSize);
// calculate bank switching and RAM sizes and masks
myBankSize = 1 << myBankShift; // e.g. = 2 ^ 12 = 4K = 0x1000
@ -93,7 +93,7 @@ void CartridgeEnhanced::install(System& system)
// Set the page accessing method for the RAM writing pages
// Note: Writes are mapped to poke() (NOT using direcPokeBase) to check for read from write port (RWP)
access.type = System::PageAccessType::WRITE;
for(size_t addr = ROM_OFFSET + myWriteOffset; addr < ROM_OFFSET + myWriteOffset + myRamSize; addr += System::PAGE_SIZE)
for(uInt16 addr = ROM_OFFSET + myWriteOffset; addr < ROM_OFFSET + myWriteOffset + myRamSize; addr += System::PAGE_SIZE)
{
const uInt16 offset = addr & myRamMask;
@ -105,7 +105,7 @@ void CartridgeEnhanced::install(System& system)
// Set the page accessing method for the RAM reading pages
access.type = System::PageAccessType::READ;
for(size_t addr = ROM_OFFSET + myReadOffset; addr < ROM_OFFSET + myReadOffset + myRamSize; addr += System::PAGE_SIZE)
for(uInt16 addr = ROM_OFFSET + myReadOffset; addr < ROM_OFFSET + myReadOffset + myRamSize; addr += System::PAGE_SIZE)
{
const uInt16 offset = addr & myRamMask;