Add fallthrough notes to intentional fallthroughs against compiler warnings and for better code readability
This commit is contained in:
parent
f7b3f1ba17
commit
e75ef54a75
|
|
@ -78,9 +78,11 @@ void ALStream::close()
|
||||||
case Playing:
|
case Playing:
|
||||||
case Paused:
|
case Paused:
|
||||||
stopStream();
|
stopStream();
|
||||||
|
/* falls through */
|
||||||
case Stopped:
|
case Stopped:
|
||||||
closeSource();
|
closeSource();
|
||||||
state = Closed;
|
state = Closed;
|
||||||
|
/* falls through */
|
||||||
case Closed:
|
case Closed:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -95,8 +97,10 @@ void ALStream::open(const std::string &filename)
|
||||||
case Playing:
|
case Playing:
|
||||||
case Paused:
|
case Paused:
|
||||||
stopStream();
|
stopStream();
|
||||||
|
/* falls through */
|
||||||
case Stopped:
|
case Stopped:
|
||||||
closeSource();
|
closeSource();
|
||||||
|
/* falls through */
|
||||||
case Closed:
|
case Closed:
|
||||||
openSource(filename);
|
openSource(filename);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,9 +119,11 @@ void AudioStream::play(const std::string &filename,
|
||||||
case ALStream::Paused :
|
case ALStream::Paused :
|
||||||
case ALStream::Playing :
|
case ALStream::Playing :
|
||||||
stream.stop();
|
stream.stop();
|
||||||
|
/* falls through */
|
||||||
case ALStream::Stopped :
|
case ALStream::Stopped :
|
||||||
if (diffFile)
|
if (diffFile)
|
||||||
stream.close();
|
stream.close();
|
||||||
|
/* falls through */
|
||||||
case ALStream::Closed :
|
case ALStream::Closed :
|
||||||
if (diffFile)
|
if (diffFile)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -455,6 +455,7 @@ void EventThread::process(RGSSThreadData &rtData)
|
||||||
case SDL_FINGERDOWN :
|
case SDL_FINGERDOWN :
|
||||||
i = event.tfinger.fingerId;
|
i = event.tfinger.fingerId;
|
||||||
touchState.fingers[i].down = true;
|
touchState.fingers[i].down = true;
|
||||||
|
/* falls through */
|
||||||
|
|
||||||
case SDL_FINGERMOTION :
|
case SDL_FINGERMOTION :
|
||||||
i = event.tfinger.fingerId;
|
i = event.tfinger.fingerId;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue