Skip to content

Commit cfae9ac

Browse files
committed
Fix ambiguous if/else constructs
1 parent 301c0dd commit cfae9ac

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Source/Activities/MultiplayerServerLobby.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -799,18 +799,20 @@ namespace RTE {
799799
}
800800

801801
// Now set the selected tech's module index as what the metaplayer is going to use
802-
if (pTechItem)
802+
if (pTechItem) {
803803
if (pTechItem->m_ExtraIndex == -2)
804804
pGameActivity->SetTeamTech(team, "-All-");
805805
else
806806
pGameActivity->SetTeamTech(team, g_PresetMan.GetDataModuleName(pTechItem->m_ExtraIndex));
807+
}
807808
}
808809

809810
// Set up AI skill levels
810-
if (m_apTeamAISkillSlider[team]->IsEnabled())
811+
if (m_apTeamAISkillSlider[team]->IsEnabled()) {
811812
pGameActivity->SetTeamAISkill(team, m_apTeamAISkillSlider[team]->GetValue());
812-
else
813+
} else {
813814
pGameActivity->SetTeamAISkill(team, AISkillSetting::DefaultSkill);
815+
}
814816
}
815817

816818
// Force close all previously opened files

Source/Menus/GibEditorGUI.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ void GibEditorGUI::Update() {
420420
m_CursorPos = g_SceneMan.SnapPosition(m_CursorPos);
421421
}
422422

423-
if (m_pController->IsState(RELEASE_PRIMARY))
423+
if (m_pController->IsState(RELEASE_PRIMARY)) {
424424

425425
// Cancel placing if secondary button is pressed
426426
if (m_pController->IsState(PRESS_SECONDARY) || m_pController->IsState(PIE_MENU_ACTIVE)) {
@@ -449,6 +449,7 @@ void GibEditorGUI::Update() {
449449
// Go back to previous mode
450450
m_EditorGUIMode = m_PreviousMode;
451451
}
452+
}
452453

453454
// Set the facing of AHumans based on right/left cursor movements
454455
AHuman* pAHuman = dynamic_cast<AHuman*>(m_pCurrentGib);

0 commit comments

Comments
 (0)