Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
This commit is contained in:
@@ -274,17 +274,17 @@ void DeserializeNetworkGameInfo(Packet *p, NetworkGameInfo *info, const GameInfo
|
||||
switch (game_info_version) {
|
||||
case 7:
|
||||
info->ticks_playing = p->Recv_uint64();
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
case 6:
|
||||
newgrf_serialisation = (NewGRFSerializationType)p->Recv_uint8();
|
||||
if (newgrf_serialisation >= NST_END) return;
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
case 5: {
|
||||
info->gamescript_version = (int)p->Recv_uint32();
|
||||
info->gamescript_name = p->Recv_string(NETWORK_NAME_LENGTH);
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
}
|
||||
|
||||
case 4: {
|
||||
@@ -326,19 +326,19 @@ void DeserializeNetworkGameInfo(Packet *p, NetworkGameInfo *info, const GameInfo
|
||||
*dst = c;
|
||||
dst = &c->next;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
}
|
||||
|
||||
case 3:
|
||||
info->calendar_date = Clamp(p->Recv_uint32(), 0, CalendarTime::MAX_DATE.base());
|
||||
info->calendar_start = Clamp(p->Recv_uint32(), 0, CalendarTime::MAX_DATE.base());
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
case 2:
|
||||
info->companies_max = p->Recv_uint8 ();
|
||||
info->companies_on = p->Recv_uint8 ();
|
||||
p->Recv_uint8(); // Used to contain max-spectators.
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
case 1:
|
||||
info->server_name = p->Recv_string(NETWORK_NAME_LENGTH);
|
||||
|
@@ -454,7 +454,7 @@ struct NetworkChatWindow : public Window {
|
||||
switch (widget) {
|
||||
case WID_NC_SENDBUTTON: /* Send */
|
||||
SendChat(this->message_editbox.text.buf, this->dtype, this->dest);
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
case WID_NC_CLOSE: /* Cancel */
|
||||
this->Close();
|
||||
|
@@ -894,7 +894,7 @@ public:
|
||||
return ES_HANDLED;
|
||||
}
|
||||
/* space is pressed and filter is focused. */
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
default:
|
||||
return ES_NOT_HANDLED;
|
||||
|
@@ -2134,7 +2134,7 @@ struct NetworkJoinStatusWindow : Window {
|
||||
progress = 15; // We don't have the final size yet; the server is still compressing!
|
||||
break;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
default: // Waiting is 15%, so the resting receivement of map is maximum 70%
|
||||
progress = 15 + _network_join_bytes * (100 - 15) / _network_join_bytes_total;
|
||||
@@ -2307,7 +2307,7 @@ struct NetworkCompanyPasswordWindow : public Window {
|
||||
switch (widget) {
|
||||
case WID_NCP_OK:
|
||||
this->OnOk();
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
case WID_NCP_CANCEL:
|
||||
this->Close();
|
||||
|
@@ -1362,7 +1362,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
|
||||
}
|
||||
default:
|
||||
Debug(net, 1, "Received unknown chat destination type {}; doing broadcast instead", desttype);
|
||||
FALLTHROUGH;
|
||||
[[fallthrough]];
|
||||
|
||||
case DESTTYPE_BROADCAST:
|
||||
for (NetworkClientSocket *cs : NetworkClientSocket::Iterate()) {
|
||||
|
Reference in New Issue
Block a user