Even more conversion, lots of superfluous macro removal
This commit is contained in:
+9
-9
@@ -39,13 +39,13 @@ static in_addr_t myAddr;
|
||||
|
||||
sys_socket_t UDP_Init (void)
|
||||
{
|
||||
int err, i;
|
||||
int err;
|
||||
char *tst;
|
||||
char buff[MAXHOSTNAMELEN];
|
||||
struct hostent *local;
|
||||
struct qsockaddr addr;
|
||||
|
||||
if (COM_CheckParm ("-noudp"))
|
||||
if (common::check_param ("-noudp").has_value())
|
||||
return INVALID_SOCKET;
|
||||
|
||||
// determine my name & address
|
||||
@@ -81,15 +81,15 @@ sys_socket_t UDP_Init (void)
|
||||
}
|
||||
else
|
||||
{
|
||||
i = COM_CheckParm ("-ip");
|
||||
if (i)
|
||||
auto i = common::check_param ("-ip");
|
||||
if (i.has_value())
|
||||
{
|
||||
if (i < com_argc-1)
|
||||
if (i.value() < com_argc-1)
|
||||
{
|
||||
myAddr = inet_addr(com_argv[i + 1]);
|
||||
myAddr = inet_addr(com_argv[i.value() + 1]);
|
||||
if (myAddr == INADDR_NONE)
|
||||
Sys_Error ("%s is not a valid IP address", com_argv[i + 1]);
|
||||
strcpy(my_tcpip_address, com_argv[i + 1]);
|
||||
Sys_Error ("%s is not a valid IP address", com_argv[i.value() + 1]);
|
||||
strcpy(my_tcpip_address, com_argv[i.value() + 1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -134,7 +134,7 @@ void UDP_Shutdown (void)
|
||||
|
||||
//=============================================================================
|
||||
|
||||
void UDP_Listen (qboolean state)
|
||||
void UDP_Listen (bool state)
|
||||
{
|
||||
// enable listening
|
||||
if (state)
|
||||
|
||||
Reference in New Issue
Block a user