mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 13:09:15 +00:00
(svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH).
This commit is contained in:
@@ -246,16 +246,16 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i
|
||||
*dst = c;
|
||||
dst = &c->next;
|
||||
}
|
||||
} // Fallthrough
|
||||
} // FALL THROUGH
|
||||
case 3:
|
||||
info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
|
||||
info->start_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
|
||||
/* Fallthrough */
|
||||
/* FALL THROUGH */
|
||||
case 2:
|
||||
info->companies_max = p->Recv_uint8 ();
|
||||
info->companies_on = p->Recv_uint8 ();
|
||||
info->spectators_max = p->Recv_uint8 ();
|
||||
/* Fallthrough */
|
||||
/* FALL THROUGH */
|
||||
case 1:
|
||||
p->Recv_string(info->server_name, sizeof(info->server_name));
|
||||
p->Recv_string(info->server_revision, sizeof(info->server_revision));
|
||||
|
@@ -484,7 +484,7 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
|
||||
switch (widget) {
|
||||
/* Send */
|
||||
case NWCW_SENDBUTTON: SendChat(this->text.buf, this->dtype, this->dest);
|
||||
/* FALLTHROUGH */
|
||||
/* FALL THROUGH */
|
||||
case NWCW_CLOSE: /* Cancel */ delete this; break;
|
||||
}
|
||||
}
|
||||
@@ -510,7 +510,7 @@ struct NetworkChatWindow : public QueryStringBaseWindow {
|
||||
} break;
|
||||
case HEBR_CONFIRM:
|
||||
SendChat(this->text.buf, this->dtype, this->dest);
|
||||
/* FALLTHROUGH */
|
||||
/* FALL THROUGH */
|
||||
case HEBR_CANCEL: delete this; break;
|
||||
case HEBR_NOT_FOCUSED: break;
|
||||
}
|
||||
|
@@ -782,7 +782,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CHAT)
|
||||
/* For speaking to company or giving money, we need the company-name */
|
||||
case NETWORK_ACTION_GIVE_MONEY:
|
||||
if (!Company::IsValidID(ci_to->client_playas)) return NETWORK_RECV_STATUS_OKAY;
|
||||
/* fallthrough */
|
||||
/* FALL THROUGH */
|
||||
case NETWORK_ACTION_CHAT_COMPANY: {
|
||||
StringID str = Company::IsValidID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS;
|
||||
SetDParam(0, ci_to->client_playas);
|
||||
|
@@ -688,7 +688,7 @@ public:
|
||||
}
|
||||
return ES_HANDLED;
|
||||
}
|
||||
/* Fall through when pressing space is pressed and filter isn't focused */
|
||||
/* FALL THROUGH, space is pressed and filter isn't focused. */
|
||||
|
||||
default: {
|
||||
/* Handle editbox input */
|
||||
|
@@ -2158,7 +2158,7 @@ struct NetworkJoinStatusWindow : Window {
|
||||
SetDParam(0, _network_join_bytes);
|
||||
SetDParam(1, _network_join_bytes_total);
|
||||
DrawString(r.left + 2, r.right - 2, r.top + 20 + FONT_HEIGHT_NORMAL, STR_NETWORK_CONNECTING_DOWNLOADING, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
/* Fallthrough */
|
||||
/* FALL THROUGH */
|
||||
default: // Waiting is 15%, so the resting receivement of map is maximum 70%
|
||||
progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total;
|
||||
}
|
||||
|
@@ -1153,7 +1153,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
|
||||
break;
|
||||
default:
|
||||
DEBUG(net, 0, "[server] received unknown chat destination type %d. Doing broadcast instead", desttype);
|
||||
/* fall-through to next case */
|
||||
/* FALL THROUGH */
|
||||
case DESTTYPE_BROADCAST:
|
||||
FOR_ALL_CLIENT_SOCKETS(cs) {
|
||||
SEND_COMMAND(PACKET_SERVER_CHAT)(cs, action, from_id, false, msg, data);
|
||||
@@ -1185,7 +1185,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_CHAT)
|
||||
switch (action) {
|
||||
case NETWORK_ACTION_GIVE_MONEY:
|
||||
if (!Company::IsValidID(ci->client_playas)) break;
|
||||
/* Fall-through */
|
||||
/* FALL THROUGH */
|
||||
case NETWORK_ACTION_CHAT:
|
||||
case NETWORK_ACTION_CHAT_CLIENT:
|
||||
case NETWORK_ACTION_CHAT_COMPANY:
|
||||
|
Reference in New Issue
Block a user