From 09bb3c3acf4f2777dbc4f7b35b428a9243680a53 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Fri, 7 Oct 2022 10:57:28 +0200 Subject: [PATCH] Remove fallthrough - breaks Clang on Mac/iOS --- src/apu/Gb_Apu.cpp | 2 +- src/gba/Cheats.cpp | 2 +- src/gba/GBA.cpp | 2 +- src/gba/GBAinline.h | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/apu/Gb_Apu.cpp b/src/apu/Gb_Apu.cpp index e3518846..87943f65 100644 --- a/src/apu/Gb_Apu.cpp +++ b/src/apu/Gb_Apu.cpp @@ -218,7 +218,7 @@ void Gb_Apu::run_until_( blip_time_t end_time ) case 6: // 128 Hz square1.clock_sweep(); - [[fallthrough]]; + /* fallthrough */ case 0: case 4: // 256 Hz diff --git a/src/gba/Cheats.cpp b/src/gba/Cheats.cpp index de41980d..d4c33662 100644 --- a/src/gba/Cheats.cpp +++ b/src/gba/Cheats.cpp @@ -1353,7 +1353,7 @@ void cheatsDelete(int number, bool restore) } else { CPUWriteMemory(cheatsList[x].address, cheatsList[x].oldValue); } - [[fallthrough]]; + /* fallthrough */ case GSA_16_BIT_ROM_PATCH: if (cheatsList[x].status & 1) { cheatsList[x].status &= ~1; diff --git a/src/gba/GBA.cpp b/src/gba/GBA.cpp index 0cb453b0..8ef2a4b8 100644 --- a/src/gba/GBA.cpp +++ b/src/gba/GBA.cpp @@ -2248,7 +2248,7 @@ void CPUSoftwareInterrupt(int comment) case 0x2A: BIOS_SndDriverJmpTableCopy(); // let it go, because we don't really emulate this function - [[fallthrough]]; + /* fallthrough */ default: #ifdef GBA_LOGGING if (systemVerbose & VERBOSE_SWI) { diff --git a/src/gba/GBAinline.h b/src/gba/GBAinline.h index 9f78cf0f..1c80323a 100644 --- a/src/gba/GBAinline.h +++ b/src/gba/GBAinline.h @@ -131,7 +131,7 @@ static inline uint32_t CPUReadMemory(uint32_t address) value = flashRead(address) * 0x01010101; break; } - [[fallthrough]]; + /* fallthrough */ default: unreadable: #ifdef GBA_LOGGING @@ -281,7 +281,7 @@ static inline uint32_t CPUReadHalfWord(uint32_t address) value = flashRead(address) * 0x0101; break; } - [[fallthrough]]; + /* fallthrough */ default: unreadable: if (cpuDmaRunning|| ((reg[15].I - cpuDmaPC) == (armState ? 4 : 2))) { @@ -407,7 +407,7 @@ static inline uint8_t CPUReadByte(uint32_t address) case 0x8500: return systemGetSensorY() >> 8; } - [[fallthrough]]; + /* fallthrough */ default: unreadable: #ifdef GBA_LOGGING @@ -627,7 +627,7 @@ static inline void CPUWriteHalfWord(uint32_t address, uint16_t value) (*cpuSaveGameFunc)(address, (uint8_t)value); break; } - // fallthrough + /* fallthrough */ default: unwritable: #ifdef GBA_LOGGING