mirror of https://github.com/FWGS/xash3d-fwgs
common: netadr: use static_assert macro
This commit is contained in:
parent
64e97124c3
commit
e30c61c0e2
|
@ -31,8 +31,6 @@ typedef enum
|
||||||
NA_MULTICAST_IP6, // all nodes multicast
|
NA_MULTICAST_IP6, // all nodes multicast
|
||||||
} netadrtype_t;
|
} netadrtype_t;
|
||||||
|
|
||||||
#define NETADR_T_SIZE 20
|
|
||||||
|
|
||||||
// Original structure:
|
// Original structure:
|
||||||
// typedef struct netadr_s
|
// typedef struct netadr_s
|
||||||
// {
|
// {
|
||||||
|
@ -73,6 +71,6 @@ typedef struct netadr_s
|
||||||
} netadr_t;
|
} netadr_t;
|
||||||
#pragma pack( pop )
|
#pragma pack( pop )
|
||||||
|
|
||||||
extern int _check_netadr_t_size[sizeof( netadr_t ) == NETADR_T_SIZE ? 1 : -1];
|
STATIC_ASSERT( sizeof( netadr_t ) == 20, "invalid netadr_t size" );
|
||||||
|
|
||||||
#endif//NETADR_H
|
#endif//NETADR_H
|
||||||
|
|
Loading…
Reference in New Issue