Pārlūkot izejas kodu

fixing use of non-constant in case of switch

dds
Dave Crist pirms 4 gadiem
vecāks
revīzija
970dcb1a0b
1 mainītis faili ar 5 papildinājumiem un 7 dzēšanām
  1. +5
    -7
      play_sd_wav.cpp

+ 5
- 7
play_sd_wav.cpp Parādīt failu

@@ -125,13 +125,11 @@ void AudioPlaySdWav::togglePlayPause(void) {
if(state_play >= 8 || state == STATE_STOP) return;

// toggle back and forth between state_play and STATE_PAUSED
switch(state) {
case state_play:
state = STATE_PAUSED
break;
case STATE_PAUSED:
state = state_play;
break;
if(state == state_play) {
state = STATE_PAUSED
}
else if(state == STATE_PAUSED)
state = state_play;
}
}


Notiek ielāde…
Atcelt
Saglabāt