Suppress Compile Warnings - Unguarded IF, Misleading Indent

A mix of tabs and space indententation is misleading.
Some statements visually align with IF statements, but are outside the IF body.

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6941 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a87be2c44a3049e0b14013a4e8e2acff16c1e08b
Former-commit-id: 5847eb1e3946a4ff783eca84d2e52f2ebff836de
This commit is contained in:
scttgs0 2020-04-24 02:38:55 +00:00
parent b925ca8e51
commit 6549f75037
7 changed files with 48 additions and 48 deletions

View file

@ -9,7 +9,7 @@
// File : unitpit.cpp
// Created : 2007.02.20
// Last changed : 2014.11.29
// Copyright : © 2007-2014 Wolf-Dieter Beelitz
// Copyright : <EFBFBD> 2007-2014 Wolf-Dieter Beelitz
// eMail : wdbee@users.sourceforge.net
// Version : 4.05.000
//--------------------------------------------------------------------------*
@ -31,17 +31,17 @@
//
// Das Programm wurde unter Windows XP entwickelt und getestet.
// Fehler sind nicht bekannt, dennoch gilt:
// Wer die Dateien verwendet erkennt an, dass für Fehler, Schäden,
// Folgefehler oder Folgeschäden keine Haftung übernommen wird.
// Wer die Dateien verwendet erkennt an, dass f<EFBFBD>r Fehler, Sch<63>den,
// Folgefehler oder Folgesch<EFBFBD>den keine Haftung <20>bernommen wird.
//--------------------------------------------------------------------------*
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Im übrigen gilt für die Nutzung und/oder Weitergabe die
// Im <EFBFBD>brigen gilt f<>r die Nutzung und/oder Weitergabe die
// GNU GPL (General Public License)
// Version 2 oder nach eigener Wahl eine spätere Version.
// Version 2 oder nach eigener Wahl eine sp<EFBFBD>tere Version.
//--------------------------------------------------------------------------*
// WARNING:
//
@ -1035,15 +1035,16 @@ double TPitLane::DistToPitStop(double TrackPos, bool Pitting) const
DL += (float)(oPitStopOffset - TRACKRES / 2);
// LogSimplix.debug("DistToPitStop: %g-%g=%g\n",dist,DL,dist-DL);
Dist = DL;
if (Dist < 0)
Dist += oTrack->Length();
if (Dist < 0)
Dist += oTrack->Length();
}
else
{
Dist = oPitStopPos - oPitEntryStartPos;
if (Dist < 0)
Dist += oTrack->Length();
Dist += DistToPitEntry(TrackPos);
Dist = oPitStopPos - oPitEntryStartPos;
if (Dist < 0)
Dist += oTrack->Length();
Dist += DistToPitEntry(TrackPos);
}
return Dist;
}

View file

@ -3936,14 +3936,14 @@ tdble GfParmGetVariable(void *handle, char const *path, char const *key)
char *str;
tdble *val;
strcpy( pathdup, path );
if( pathdup[ 0 ] == '/' )
memmove( pathdup, pathdup + sizeof( char ), sizeof( char ) * strlen( pathdup ) );
if ( pathdup[ 0 ] == '/' )
memmove( pathdup, pathdup + sizeof( char ), sizeof( char ) * strlen( pathdup ) );
if ((parmHandle == NULL) || (parmHandle->magic != PARM_MAGIC)) {
GfLogError ("GfParmGetVariable: bad handle (%p)\n", parmHandle);
free(pathdup);
return 0.0f;
}
if ((parmHandle == NULL) || (parmHandle->magic != PARM_MAGIC)) {
GfLogError ("GfParmGetVariable: bad handle (%p)\n", parmHandle);
free(pathdup);
return 0.0f;
}
conf = parmHandle->conf;

View file

@ -821,19 +821,18 @@ bool GfglFeatures::loadSupport(int &nWidth, int &nHeight, int &nDepth,
// 11) Bump Mapping.
const std::string strBumpMapping =
GfParmGetStr(hparm, GFSCR_SECT_GLDETFEATURES, GFSCR_ATT_BUMPMAPPING, "");
if (strTexComp == GFSCR_VAL_YES) //strTexComp ? Bug ?
if (strTexComp == GFSCR_VAL_YES) //strTexComp ? Bug ?
_mapSupportedBool[BumpMapping] = true;
else if (strTexComp == GFSCR_VAL_NO)
_mapSupportedBool[BumpMapping] = false;
// 11) Anisotropic Filtering.
const int nAF =
(int)GfParmGetNum(hparm, GFSCR_SECT_GLDETFEATURES, GFSCR_ATT_ANISOTROPICFILTERING,
pszNoUnit, (tdble)0);
if (nMaxTexSize > 0)
_mapSupportedInt[AnisotropicFiltering] =nAF;
// 11) Anisotropic Filtering.
const int nAF =
(int)GfParmGetNum(hparm, GFSCR_SECT_GLDETFEATURES, GFSCR_ATT_ANISOTROPICFILTERING,
pszNoUnit, (tdble)0);
if (nMaxTexSize > 0)
_mapSupportedInt[AnisotropicFiltering] =nAF;
// Close config file if we open it.
if (!hparmConfig)
closeConfigFile(hparm);
@ -1256,11 +1255,11 @@ void GfglFeatures::storeSelection(void* hparmConfig) const
isSelected(BumpMapping)
? GFSCR_ATT_BUMPMAPPING_ENABLED : GFSCR_ATT_BUMPMAPPING_DISABLED);
if (getSupported(AnisotropicFiltering) != InvalidInt)
GfParmSetNum(hparm, GFSCR_SECT_GLSELFEATURES, GFSCR_ATT_ANISOTROPICFILTERING, pszNoUnit,
(tdble)getSelected(AnisotropicFiltering));
else
GfParmRemove(hparm, GFSCR_SECT_GLSELFEATURES, GFSCR_ATT_ANISOTROPICFILTERING);
if (getSupported(AnisotropicFiltering) != InvalidInt)
GfParmSetNum(hparm, GFSCR_SECT_GLSELFEATURES, GFSCR_ATT_ANISOTROPICFILTERING, pszNoUnit,
(tdble)getSelected(AnisotropicFiltering));
else
GfParmRemove(hparm, GFSCR_SECT_GLSELFEATURES, GFSCR_ATT_ANISOTROPICFILTERING);
// Write new params to config file.
GfParmWriteFile(NULL, hparm, "Screen");

View file

@ -360,18 +360,18 @@ grSplitScreen(void *vp)
case GR_SPLIT_ADD:
if (grNbActiveScreens < GR_NB_MAX_SCREEN)
grNbActiveScreens++;
if (grSpanSplit)
grNbArrangeScreens=1;
else
grNbArrangeScreens=0;
if (grSpanSplit)
grNbArrangeScreens=1;
else
grNbArrangeScreens=0;
break;
case GR_SPLIT_REM:
if (grNbActiveScreens > 1)
grNbActiveScreens--;
if (grSpanSplit)
grNbArrangeScreens=1;
else
grNbArrangeScreens=0;
if (grSpanSplit)
grNbArrangeScreens=1;
else
grNbArrangeScreens=0;
break;
case GR_SPLIT_ARR:
grNbArrangeScreens++;

View file

@ -636,11 +636,11 @@ ReUpdateRaceCurRes()
ncars = ReInfo->s->_ncars;
if (ncars > ReUI().getResultsTableRowCount())
ncars = ReUI().getResultsTableRowCount();
ncars = ReUI().getResultsTableRowCount();
char pszTitle[128];
snprintf(pszTitle, sizeof(pszTitle), "%s at %s",
ReInfo->_reRaceName, ReInfo->track->name);
char pszTitle[128];
snprintf(pszTitle, sizeof(pszTitle), "%s at %s",
ReInfo->_reRaceName, ReInfo->track->name);
if (ReInfo->s->_totTime > ReInfo->s->currentTime)
{

View file

@ -650,11 +650,11 @@ ReUpdateRaceCurRes()
ncars = ReInfo->s->_ncars;
if (ncars > ReUI().getResultsTableRowCount())
ncars = ReUI().getResultsTableRowCount();
ncars = ReUI().getResultsTableRowCount();
char pszTitle[128];
snprintf(pszTitle, sizeof(pszTitle), "%s at %s",
ReInfo->_reRaceName, ReInfo->track->name);
char pszTitle[128];
snprintf(pszTitle, sizeof(pszTitle), "%s at %s",
ReInfo->_reRaceName, ReInfo->track->name);
if (ReInfo->s->_totTime > ReInfo->s->currentTime)
{

View file

@ -63,7 +63,7 @@ int closeGfModule()
if (LegacyMenu::_pSelf)
LegacyMenu::unregister(LegacyMenu::_pSelf);
DisplayMenuRelease();
DisplayMenuRelease();
// Delete the (only) module instance.
delete LegacyMenu::_pSelf;