Skip to content

Commit 91e7384

Browse files
committed
fix: Handle braceless control-flow body indentation in conversion script and re-run
1 parent 5ab8410 commit 91e7384

46 files changed

Lines changed: 124 additions & 103 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Generals/Code/GameEngine/Include/GameClient/Image.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ class ImageCollection : public SubsystemInterface
140140
Image *Enum(unsigned index)
141141
{
142142
for (ImageMap::iterator i=m_imageMap.begin();i!=m_imageMap.end();++i)
143-
if (!index--)
144-
return i->second;
143+
if (!index--)
144+
return i->second;
145145
return nullptr;
146146
}
147147

Generals/Code/GameEngine/Source/Common/System/BuildAssistant.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ Object *BuildAssistant::buildObjectNow( Object *constructorObject, const ThingTe
340340
// Need to validate that we can make this in case someone fakes their CommandSet
341341
// A Null constructorObject is used by the script engine to cheat, so let it slide
342342
if( constructorObject && !isPossibleToMakeUnit(constructorObject, what) )
343-
return nullptr;
343+
return nullptr;
344344

345345
// clear out any objects from the building area that are "auto-clearable" when building
346346
clearRemovableForConstruction( what, pos, angle );

Generals/Code/GameEngine/Source/GameClient/Drawable.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ void Drawable::updateDrawable()
11821182
}
11831183

11841184
if (m_colorTintEnvelope)
1185-
m_colorTintEnvelope->update(); // defector fx, disable fx, etc...
1185+
m_colorTintEnvelope->update(); // defector fx, disable fx, etc...
11861186

11871187
if (m_selectionFlashEnvelope)
11881188
m_selectionFlashEnvelope->update(); // selection flashing
@@ -1277,13 +1277,13 @@ Bool Drawable::calcPhysicsXform(PhysicsXformInfo& info)
12771277
// HOTFIX: Ensure that we are not passing denormalized values back to caller
12781278
// @todo remove hotfix
12791279
if (info.m_totalPitch>-1e-20f&&info.m_totalPitch<1e-20f)
1280-
info.m_totalPitch=0.f;
1280+
info.m_totalPitch=0.f;
12811281
if (info.m_totalRoll>-1e-20f&&info.m_totalRoll<1e-20f)
1282-
info.m_totalRoll=0.f;
1282+
info.m_totalRoll=0.f;
12831283
if (info.m_totalYaw>-1e-20f&&info.m_totalYaw<1e-20f)
1284-
info.m_totalYaw=0.f;
1284+
info.m_totalYaw=0.f;
12851285
if (info.m_totalZ>-1e-20f&&info.m_totalZ<1e-20f)
1286-
info.m_totalZ=0.f;
1286+
info.m_totalZ=0.f;
12871287
}
12881288

12891289
return hasPhysicsXform;

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/ControlBarPopupDescription.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ void ControlBar::populateBuildTooltipLayout( const CommandButton *commandButton,
574574
diffSize = newSize.y - size.y;
575575
GameWindow *parent = m_buildToolTipLayout->getFirstWindow();
576576
if(!parent)
577-
return;
577+
return;
578578

579579
parent->winGetSize(&size.x, &size.y);
580580
if(size.y + diffSize < 102) {

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/LanGameOptionsMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ WindowMsgHandledType LanGameOptionsMenuSystem( GameWindow *window, UnsignedInt m
10791079
{
10801080
// We don't have anything that'll happen if we click on ourselves
10811081
if(i == myGame->getLocalSlotNum())
1082-
break;
1082+
break;
10831083
// Get
10841084
Int pos = -1;
10851085
GadgetComboBoxGetSelectedPos(comboBoxPlayer[i], &pos);

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/MapSelectMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ WindowMsgHandledType MapSelectMenuSystem( GameWindow *window, UnsignedInt msg,
407407
buttonPushed = true;
408408
// reset the campaign manager to empty
409409
if( TheCampaignManager )
410-
TheCampaignManager->setCampaign( "" );
410+
TheCampaignManager->setCampaign( "" );
411411
// get text of the map to load
412412
const char *mapFname = (const char *)GadgetListBoxGetItemData( mapWindow, selected );
413413
DEBUG_ASSERTCRASH(mapFname, ("No map item data"));

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ScoreScreen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ winName.format("ScoreScreen.wnd:StaticTextScore%d", pos);
16511651
disCons = stats.discons[ptIdx];
16521652
disCons -= 1;
16531653
if (disCons >= 0)
1654-
stats.discons[ptIdx] = disCons;
1654+
stats.discons[ptIdx] = disCons;
16551655

16561656
stats.gamesAsRandom += (localSlot->getOriginalPlayerTemplate() == PLAYERTEMPLATE_RANDOM);
16571657

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/SkirmishGameOptionsMenu.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ void updateMapStartSpots( GameInfo *myGame, GameWindow *buttonMapStartPositions[
804804
for( i = 0; i < MAX_SLOTS; ++i)
805805
{
806806
if ( buttonMapStartPositions[i] == nullptr )
807-
continue;
807+
continue;
808808

809809
GameSlot *gs =myGame->getSlot(i);
810810
if(onLoadScreen)
@@ -836,7 +836,7 @@ void updateMapStartSpots( GameInfo *myGame, GameWindow *buttonMapStartPositions[
836836
static void handlePlayerSelection(int index)
837837
{
838838
if( index == 0 || index >=MAX_SLOTS)
839-
return;
839+
return;
840840

841841
GameWindow *combo = comboBoxPlayer[index];
842842
Int playerType, selIndex;
@@ -849,7 +849,7 @@ static void handlePlayerSelection(int index)
849849
{
850850
GameSlot * slot = myGame->getSlot(index);
851851
if(!slot)
852-
return;
852+
return;
853853
slot->setState(SlotState(playerType), title);
854854

855855
}
@@ -869,7 +869,7 @@ static void handleColorSelection(int index)
869869
{
870870
GameSlot * slot = myGame->getSlot(index);
871871
if(!slot)
872-
return;
872+
return;
873873
if (color == slot->getColor())
874874
return;
875875

@@ -908,7 +908,7 @@ static void handlePlayerTemplateSelection(int index)
908908
{
909909
GameSlot * slot = myGame->getSlot(index);
910910
if(!slot)
911-
return;
911+
return;
912912
if (playerTemplate == slot->getPlayerTemplate())
913913
return;
914914

@@ -961,7 +961,7 @@ static void handleTeamSelection(int index)
961961
{
962962
GameSlot * slot = myGame->getSlot(index);
963963
if(!slot)
964-
return;
964+
return;
965965
if (team == slot->getTeamNumber())
966966
return;
967967

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLGameSetupMenu.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2432,7 +2432,7 @@ WindowMsgHandledType WOLGameSetupMenuSystem( GameWindow *window, UnsignedInt msg
24322432
{
24332433
// We don't have anything that'll happen if we click on ourselves
24342434
if(i == myGame->getLocalSlotNum())
2435-
break;
2435+
break;
24362436
// Get
24372437
Int pos = -1;
24382438
GadgetComboBoxGetSelectedPos(comboBoxPlayer[i], &pos);
@@ -2604,7 +2604,7 @@ WindowMsgHandledType WOLGameSetupMenuSystem( GameWindow *window, UnsignedInt msg
26042604
case GBM_SELECTED_RIGHT:
26052605
{
26062606
if (buttonPushed)
2607-
break;
2607+
break;
26082608

26092609
GameWindow *control = (GameWindow *)mData1;
26102610
Int controlID = control->winGetWindowId();

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/WOLQuickMatchMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ WindowMsgHandledType WOLQuickMatchMenuSystem( GameWindow *window, UnsignedInt ms
16161616
Int val;
16171617
GadgetComboBoxGetSelectedPos(comboBoxMaxDisconnects, &val);
16181618
if( val < 0)
1619-
val = 0;
1619+
val = 0;
16201620
req.QM.maxDiscons = MAX_DISCONNECTS[val];
16211621

16221622
GadgetComboBoxGetSelectedPos(comboBoxMaxPing, &val);

0 commit comments

Comments
 (0)