2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

engine: common: net_ws: make NET_IsLocalAddress inline

This commit is contained in:
Alibek Omarov 2024-10-19 14:08:27 +03:00
parent e3e4bcc015
commit fee236a050
2 changed files with 5 additions and 11 deletions

View File

@ -1018,16 +1018,6 @@ int NET_CompareAdrSort( const void *_a, const void *_b )
return 0;
}
/*
====================
NET_IsLocalAddress
====================
*/
qboolean NET_IsLocalAddress( netadr_t adr )
{
return (adr.type == NA_LOOPBACK) ? true : false;
}
/*
=============
NET_StringToAdr

View File

@ -61,7 +61,6 @@ void NET_Sleep( int msec );
qboolean NET_IsActive( void );
qboolean NET_IsConfigured( void );
void NET_Config( qboolean net_enable, qboolean changeport );
qboolean NET_IsLocalAddress( netadr_t adr );
const char *NET_AdrToString( const netadr_t a );
const char *NET_BaseAdrToString( const netadr_t a );
qboolean NET_IsReservedAdr( netadr_t a );
@ -79,6 +78,11 @@ void NET_SendPacketEx( netsrc_t sock, size_t length, const void *data, netadr_t
void NET_IP6BytesToNetadr( netadr_t *adr, const uint8_t *ip6 );
void NET_NetadrToIP6Bytes( uint8_t *ip6, const netadr_t *adr );
static inline qboolean NET_IsLocalAddress( netadr_t adr )
{
return adr.type == NA_LOOPBACK ? true : false;
}
#if !XASH_DEDICATED
int CL_GetSplitSize( void );
#endif