- fix warning (fall through)
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7871 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 3e31cc826e5db4ab3f2b50b35e2ebace141da792 Former-commit-id: 0bc4abe3559c6520f417a9eeb021561b32fec28e
This commit is contained in:
parent
f61c1da1a7
commit
9d76275de9
5 changed files with 978 additions and 942 deletions
|
@ -428,7 +428,7 @@ void TSimpleStrategy::Update(PtCarElt Car,
|
|||
//==========================================================================*
|
||||
// State (Sequential logic system)
|
||||
//--------------------------------------------------------------------------*
|
||||
void TSimpleStrategy::CheckPitState(float PitScaleBrake)
|
||||
void TSimpleStrategy::CheckPitState(float /*PitScaleBrake*/)
|
||||
{
|
||||
if (oPit == NULL) // No Pit no service
|
||||
return;
|
||||
|
@ -485,8 +485,10 @@ void TSimpleStrategy::CheckPitState(float PitScaleBrake)
|
|||
// We reached the poit to stopp
|
||||
oState = PIT_ASKED;
|
||||
LogSimplix.debug("#PIT_ENTER: %g\n", TrackPos);
|
||||
|
||||
// falls through...
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
case PIT_ASKED:
|
||||
// We are still going to the pit
|
||||
|
@ -496,7 +498,7 @@ void TSimpleStrategy::CheckPitState(float PitScaleBrake)
|
|||
oDriver->oStanding = true; // For motion survey!
|
||||
oPitTicker = 0; // Start service timer
|
||||
CarAccelCmd = 0; // release throttle
|
||||
CarBrakeCmd = 1.0 * PitScaleBrake; // Start braking
|
||||
CarBrakeCmd = 1.0; // Start braking
|
||||
CarRaceCmd = RM_CMD_PIT_ASKED; // Tell TORCS to service us! To test oPitTicker comment out
|
||||
oState = PIT_SERVICE;
|
||||
}
|
||||
|
|
|
@ -138,6 +138,7 @@ grAdaptScreenSize(void)
|
|||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 0;
|
||||
[[fallthrough]];
|
||||
case 0:
|
||||
// Top & Bottom half of the window
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw, grWinh / 2, 0.0);
|
||||
|
@ -167,6 +168,9 @@ grAdaptScreenSize(void)
|
|||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 0;
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0:
|
||||
// Left/Right below wide
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw, grWinh / 2, 0.0);
|
||||
|
@ -224,8 +228,12 @@ grAdaptScreenSize(void)
|
|||
grScreens[3]->activate(grWinx + grWinw * 3/4, grWiny, grWinw / 4, grWinh, 0.0);
|
||||
break;
|
||||
}
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
default:
|
||||
grNbArrangeScreens = 0;
|
||||
[[fallthrough]];
|
||||
case 0:
|
||||
// Top/Bottom Left/Rigth Quarters
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw / 2, grWinh / 2, 0.0);
|
||||
|
@ -290,6 +298,9 @@ grAdaptScreenSize(void)
|
|||
switch (grNbArrangeScreens) {
|
||||
default:
|
||||
grNbArrangeScreens = 0;
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0:
|
||||
// Top/Bottom Left/Middle/Rigth Matrix
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw / 2, grWinh / 2, 0.0);
|
||||
|
@ -323,8 +334,14 @@ grAdaptScreenSize(void)
|
|||
grScreens[5]->activate(grWinx + grWinw * 5/6, grWiny, grWinw / 6, grWinh, 0.0);
|
||||
break;
|
||||
}
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
default:
|
||||
grNbArrangeScreens = 0;
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 0:
|
||||
// Top/Bottom Left/Middle/Rigth Matrix
|
||||
grScreens[0]->activate(grWinx, grWiny + grWinh / 2, grWinw / 3, grWinh / 2, 0.0);
|
||||
|
|
|
@ -320,6 +320,9 @@ ReStoreRaceResults(const char *race)
|
|||
GfParmReleaseHandle(carparam);
|
||||
break;
|
||||
}
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
/* Otherwise, fall through */
|
||||
|
||||
case RM_TYPE_QUALIF:
|
||||
|
|
|
@ -54,8 +54,10 @@ ReStateManage(void)
|
|||
{
|
||||
int mode = RM_SYNC | RM_NEXT_STEP;
|
||||
|
||||
do {
|
||||
switch (ReInfo->_reState) {
|
||||
do
|
||||
{
|
||||
switch (ReInfo->_reState)
|
||||
{
|
||||
case RE_STATE_CONFIG:
|
||||
GfLogInfo("%s now in CONFIG state\n", ReInfo->_reName);
|
||||
// Race configuration
|
||||
|
@ -73,6 +75,9 @@ ReStateManage(void)
|
|||
GfMemoryManagerSetGroup(1);
|
||||
#endif
|
||||
// ... Use new Memory Manager
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
|
||||
case RE_STATE_EVENT_LOOP:
|
||||
GfLogInfo("%s now in EVENT_INIT_LOOP state\n", ReInfo->_reName);
|
||||
|
|
|
@ -347,18 +347,27 @@ void Application::generate()
|
|||
if (DoSaveElevation) {
|
||||
break;
|
||||
}
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 2:
|
||||
sprintf(buf, "%s-elv2.png", OutputFileName);
|
||||
SaveElevation(Track, TrackHandle, buf, OutMeshName, 1);
|
||||
if (DoSaveElevation) {
|
||||
break;
|
||||
}
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 3:
|
||||
sprintf(buf, "%s-elv3.png", OutputFileName);
|
||||
SaveElevation(Track, TrackHandle, buf, OutMeshName, 0);
|
||||
if (DoSaveElevation) {
|
||||
break;
|
||||
}
|
||||
#if ( __GNUC__ >= 5 || _MSVC_VER >= 1910)
|
||||
[[fallthrough]];
|
||||
#endif
|
||||
case 4:
|
||||
sprintf(buf, "%s-elv4.png", OutputFileName);
|
||||
SaveElevation(Track, TrackHandle, buf, OutTrackName, 2);
|
||||
|
|
Loading…
Reference in a new issue