mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 18:09:09 +00:00
(svn r20281) -Codechange: unify case scope closure + break coding style
This commit is contained in:
@@ -389,7 +389,8 @@ void NetworkHandlePauseChange(PauseMode prev_mode, PauseMode changed_mode)
|
||||
char buffer[DRAW_STRING_BUFFER];
|
||||
GetString(buffer, str, lastof(buffer));
|
||||
NetworkTextMessage(NETWORK_ACTION_SERVER_MESSAGE, CC_DEFAULT, false, NULL, buffer);
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
return;
|
||||
|
@@ -507,7 +507,8 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
|
||||
case HEBR_EDITING: {
|
||||
Window *osk = FindWindowById(WC_OSK, 0);
|
||||
if (osk != NULL && osk->parent == this) osk->InvalidateData();
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
case HEBR_CONFIRM:
|
||||
SendChat(this->text.buf, this->dtype, this->dest);
|
||||
/* FALL THROUGH */
|
||||
|
@@ -789,7 +789,8 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CHAT)
|
||||
|
||||
GetString(name, str, lastof(name));
|
||||
ci = NetworkFindClientInfoFromClientID(_network_own_client_id);
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
default: return NETWORK_RECV_STATUS_MALFORMED_PACKET;
|
||||
}
|
||||
|
@@ -603,7 +603,8 @@ public:
|
||||
}
|
||||
|
||||
this->InvalidateData();
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
case NCLWW_CHECKBOX:
|
||||
case NCLWW_TYPE:
|
||||
|
@@ -540,7 +540,8 @@ public:
|
||||
this->DrawServerLine(ngl, y, ngl == this->server);
|
||||
y += this->resize.step_height;
|
||||
}
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
case NGWW_LASTJOINED:
|
||||
/* Draw the last joined server, if any */
|
||||
@@ -696,7 +697,8 @@ public:
|
||||
|
||||
/* FIXME the disabling should go into some InvalidateData, which is called instead of the SetDirty */
|
||||
if (click_count > 1 && !this->IsWidgetDisabled(NGWW_JOIN)) this->OnClick(pt, NGWW_JOIN, 1);
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
case NGWW_LASTJOINED: {
|
||||
NetworkGameList *last_joined = NetworkGameListAddItem(NetworkAddress(_settings_client.network.last_host, _settings_client.network.last_port));
|
||||
@@ -716,7 +718,8 @@ public:
|
||||
/* FIXME the disabling should go into some InvalidateData, which is called instead of the SetDirty */
|
||||
if (click_count > 1 && !this->IsWidgetDisabled(NGWW_JOIN)) this->OnClick(pt, NGWW_JOIN, 1);
|
||||
}
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
case NGWW_FIND: // Find server automatically
|
||||
switch (_settings_client.network.lan_internet) {
|
||||
@@ -1171,7 +1174,8 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
|
||||
|
||||
this->map = (y == 0) ? NULL : _fios_items.Get(y - 1);
|
||||
this->SetDirty();
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
case NSSW_CONNTYPE_BTN: // Connection type
|
||||
ShowDropDownMenu(this, _connection_types_dropdown, _settings_client.network.server_advertise, NSSW_CONNTYPE_BTN, 0, 0); // do it for widget NSSW_CONNTYPE_BTN
|
||||
@@ -1227,7 +1231,8 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
|
||||
}
|
||||
}
|
||||
ShowDropDownMenu(this, _language_dropdown, sel, NSSW_LANGUAGE_BTN, 0, 0);
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
case NSSW_START: // Start game
|
||||
_is_network_server = true;
|
||||
@@ -1631,7 +1636,8 @@ struct NetworkLobbyWindow : public Window {
|
||||
|
||||
/* FIXME the disabling should go into some InvalidateData, which is called instead of the SetDirty */
|
||||
if (click_count > 1 && !this->IsWidgetDisabled(NLWW_JOIN)) this->OnClick(pt, NLWW_JOIN, 1);
|
||||
} break;
|
||||
break;
|
||||
}
|
||||
|
||||
case NLWW_JOIN: // Join company
|
||||
/* Button can be clicked only when it is enabled */
|
||||
|
Reference in New Issue
Block a user