tExtra braces added to if/else statements for clarity. - vaccinewars - be a doctor and try to vaccinate the world
(HTM) git clone git://src.adamsgaard.dk/vaccinewars
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 7bde4eec2df4a1c2e8606a751e1c2b4822ea2169
(DIR) parent 1feb8af1abfea229bc7cf9f19fc01e8f785985c7
(HTM) Author: Ben Webb <ben@salilab.org>
Date: Sat, 13 Apr 2002 16:33:09 +0000
Extra braces added to if/else statements for clarity.
Diffstat:
M src/gui_client/gtk_client.c | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
---
(DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
t@@ -1068,10 +1068,12 @@ void DisplayFightMessage(char *Data)
return;
}
if (FightDialog) {
- if (IsShowingDealDrugs)
+ if (IsShowingDealDrugs) {
gtk_widget_destroy(DealDialog.dialog);
- if (!GTK_WIDGET_VISIBLE(FightDialog))
+ }
+ if (!GTK_WIDGET_VISIBLE(FightDialog)) {
gtk_widget_show(FightDialog);
+ }
} else {
CreateFightDialog();
}
t@@ -1114,10 +1116,11 @@ void DisplayFightMessage(char *Data)
SetJetButtonTitle(accel_group);
} else {
Message = Data;
- if (Play->Flags & FIGHTING)
+ if (Play->Flags & FIGHTING) {
fp = F_MSG;
- else
+ } else {
fp = F_LASTLEAVE;
+ }
CanFire = (Play->Flags & CANSHOOT);
CanRunHere = FALSE;
}
t@@ -1130,22 +1133,26 @@ void DisplayFightMessage(char *Data)
TextViewAppend(textview, "\n", NULL, TRUE);
}
- if (!CanRunHere || fp == F_LASTLEAVE)
+ if (!CanRunHere || fp == F_LASTLEAVE) {
gtk_widget_show(Deal);
- else
+ } else {
gtk_widget_hide(Deal);
- if (CanFire && TotalGunsCarried(Play) > 0)
+ }
+ if (CanFire && TotalGunsCarried(Play) > 0) {
gtk_widget_show(Fight);
- else
+ } else {
gtk_widget_hide(Fight);
- if (CanFire && TotalGunsCarried(Play) == 0)
+ }
+ if (CanFire && TotalGunsCarried(Play) == 0) {
gtk_widget_show(Stand);
- else
+ } else {
gtk_widget_hide(Stand);
- if (fp != F_LASTLEAVE)
+ }
+ if (fp != F_LASTLEAVE) {
gtk_widget_show(Run);
- else
+ } else {
gtk_widget_hide(Run);
+ }
}
/*