summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-19 18:38:10 +0000
committerskidd13 <skidd13@openttd.org>2007-11-19 18:38:10 +0000
commit8be526e4990ef8c7a742e6f3f67a42d0036750eb (patch)
tree7818a2f346fc9a85d84a2a844989ea1a90136b90 /src/network
parent006acff1834d37ba4b1553ba324c255a6cc2382e (diff)
downloadopenttd-8be526e4990ef8c7a742e6f3f67a42d0036750eb.tar.xz
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/udp.cpp4
-rw-r--r--src/network/network_gui.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp
index a2959eb9a..0c9c74ed1 100644
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -230,8 +230,8 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i
}
} /* Fallthrough */
case 3:
- info->game_date = clamp(p->Recv_uint32(), 0, MAX_DATE);
- info->start_date = clamp(p->Recv_uint32(), 0, MAX_DATE);
+ info->game_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
+ info->start_date = Clamp(p->Recv_uint32(), 0, MAX_DATE);
/* Fallthrough */
case 2:
info->companies_max = p->Recv_uint8 ();
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 4c87531dc..f1a2416f6 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -692,9 +692,9 @@ static void NetworkStartServerWindowWndProc(Window *w, WindowEvent *e)
SetWindowDirty(w);
switch (e->we.click.widget) {
default: NOT_REACHED();
- case 9: case 11: _network_game_info.clients_max = clamp(_network_game_info.clients_max + e->we.click.widget - 10, 2, MAX_CLIENTS); break;
- case 12: case 14: _network_game_info.companies_max = clamp(_network_game_info.companies_max + e->we.click.widget - 13, 1, MAX_PLAYERS); break;
- case 15: case 17: _network_game_info.spectators_max = clamp(_network_game_info.spectators_max + e->we.click.widget - 16, 0, MAX_CLIENTS); break;
+ case 9: case 11: _network_game_info.clients_max = Clamp(_network_game_info.clients_max + e->we.click.widget - 10, 2, MAX_CLIENTS); break;
+ case 12: case 14: _network_game_info.companies_max = Clamp(_network_game_info.companies_max + e->we.click.widget - 13, 1, MAX_PLAYERS); break;
+ case 15: case 17: _network_game_info.spectators_max = Clamp(_network_game_info.spectators_max + e->we.click.widget - 16, 0, MAX_CLIENTS); break;
}
}
_left_button_clicked = false;
@@ -789,9 +789,9 @@ static void NetworkStartServerWindowWndProc(Window *w, WindowEvent *e)
InvalidateWidget(w, nd->widget_id);
switch (nd->widget_id) {
default: NOT_REACHED();
- case 10: _network_game_info.clients_max = clamp(value, 2, MAX_CLIENTS); break;
- case 13: _network_game_info.companies_max = clamp(value, 1, MAX_PLAYERS); break;
- case 16: _network_game_info.spectators_max = clamp(value, 0, MAX_CLIENTS); break;
+ case 10: _network_game_info.clients_max = Clamp(value, 2, MAX_CLIENTS); break;
+ case 13: _network_game_info.companies_max = Clamp(value, 1, MAX_PLAYERS); break;
+ case 16: _network_game_info.spectators_max = Clamp(value, 0, MAX_CLIENTS); break;
}
}