libretro / beetle-bsnes-libretro

Standalone port of Mednafen bSNES to libretro, itself a fork of bsnes 0.59.
GNU General Public License v2.0
7 stars 15 forks source link

Silence a -Wswitch-bool warning #11

Closed orbea closed 7 years ago

orbea commented 7 years ago

Silences the following warning.

In file included from mednafen/snes/src/chip/sa1/sa1.cpp:10:0:
mednafen/snes/src/chip/sa1/dma/dma.cpp: In member function ‘void SNES::SA1::dma_normal()’:
mednafen/snes/src/chip/sa1/dma/dma.cpp:35:19: warning: switch condition has type bool [-Wswitch-bool]
     switch(mmio.dd) {
                   ^

According to the following links using a switch statement with boolean value may not the best idea and an if-else statement would be preferable.

https://stackoverflow.com/questions/26411482/switch-condition-has-boolean-value https://stackoverflow.com/questions/25075017/warning-switch-condition-has-boolean-value