From c201b895ebe6281cfa1e15cbf0d06ef46ae1e302 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 9 Feb 2025 23:13:04 +0300 Subject: [PATCH] common: netadr: force cast uint16_t type to netadrtype_t So it compiles in C++ --- common/netadr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/netadr.h b/common/netadr.h index 0281eee5..0e6641c5 100644 --- a/common/netadr.h +++ b/common/netadr.h @@ -90,12 +90,12 @@ typedef struct netadr_s static inline netadrtype_t NET_NetadrType( const netadr_t *a ) { if( a->type == NA_IP6 || a->type == NA_MULTICAST_IP6 ) - return a->type; + return (netadrtype_t)a->type; if( a->ip6_0[0] || a->ip6_0[1] ) return NA_UNDEFINED; - return a->type; + return (netadrtype_t)a->type; } static inline void NET_NetadrSetType( netadr_t *a, netadrtype_t type )