remove unused util method

This commit is contained in:
Eric House 2023-01-16 10:10:01 -08:00
parent c620f9bc75
commit f1262e49e7
4 changed files with 1 additions and 70 deletions

View file

@ -690,8 +690,6 @@ and_util_cellSquareHeld( XW_UtilCtxt* uc, XWEnv xwe, XWStreamCtxt* words )
}
#endif
#ifndef XWFEATURE_STANDALONE_ONLY
static void
and_util_informMissing( XW_UtilCtxt* uc, XWEnv xwe, XP_Bool isServer,
const CommsAddrRec* hostAddr,
@ -716,14 +714,6 @@ and_util_informMissing( XW_UtilCtxt* uc, XWEnv xwe, XP_Bool isServer,
UTIL_CBK_TAIL();
}
static void
and_util_addrChange( XW_UtilCtxt* uc, XWEnv xwe,
const CommsAddrRec* oldAddr,
const CommsAddrRec* newAddr )
{
// LOG_FUNC();
}
static void
and_util_informWordsBlocked( XW_UtilCtxt* uc, XWEnv xwe, XP_U16 nBadWords,
XWStreamCtxt* words, const XP_UCHAR* dict )
@ -806,8 +796,6 @@ and_dutil_deviceRegistered( XW_DUtilCtxt* duc, XWEnv xwe, DevIDType typ,
}
#endif /* XWFEATURE_DEVID && XWFEATURE_RELAY */
#endif
#ifdef XWFEATURE_SEARCHLIMIT
static XP_Bool
and_util_getTraySearchLimits(XW_UtilCtxt* uc, XP_U16* min, XP_U16* max )
@ -1060,10 +1048,7 @@ makeUtil( MPFORMAL JNIEnv* env,
SET_PROC(cellSquareHeld);
#endif
#ifndef XWFEATURE_STANDALONE_ONLY
SET_PROC(informMissing);
SET_PROC(addrChange);
#endif
#ifdef XWFEATURE_SEARCHLIMIT
SET_PROC(getTraySearchLimits);
#endif

View file

@ -588,9 +588,6 @@ comms_destroy( CommsCtxt* comms, XWEnv xwe )
XP_ASSERT( ! addr_hasType( &comms->selfAddr, COMMS_CONN_RELAY )
|| COMMS_RELAYSTATE_UNCONNECTED == comms->rr.relayState );
CommsAddrRec aNew = {0};
util_addrChange( comms->util, xwe, &comms->selfAddr, &aNew );
cleanupInternal( comms );
cleanupAddrRecs( comms );

View file

@ -167,14 +167,10 @@ typedef struct UtilVtable {
void (*m_util_cellSquareHeld)( XW_UtilCtxt* uc, XWEnv xwe, XWStreamCtxt* words );
#endif
#ifndef XWFEATURE_STANDALONE_ONLY
void (*m_util_informMissing)( XW_UtilCtxt* uc, XWEnv xwe, XP_Bool isServer,
const CommsAddrRec* hostAddr,
const CommsAddrRec* selfAddr, XP_U16 nDevs,
XP_U16 nMissing, XP_U16 nInvited );
void (*m_util_addrChange)( XW_UtilCtxt* uc, XWEnv xwe, const CommsAddrRec* oldAddr,
const CommsAddrRec* newAddr );
#endif
void (*m_util_informWordsBlocked)( XW_UtilCtxt* uc, XWEnv xwe, XP_U16 nBadWords,
XWStreamCtxt* words, const XP_UCHAR* dictName );
@ -309,14 +305,8 @@ struct XW_UtilCtxt {
(uc)->vtable->m_util_cellSquareHeld( (uc), (e), (s) )
#endif
#ifndef XWFEATURE_STANDALONE_ONLY
# define util_informMissing( uc, e, is, ha, sa, nd, nm, ni ) \
#define util_informMissing( uc, e, is, ha, sa, nd, nm, ni ) \
(uc)->vtable->m_util_informMissing((uc), (e), (is), (ha), (sa), (nd), (nm), (ni) )
# define util_addrChange( uc,e, addro, addrn ) \
(uc)->vtable->m_util_addrChange((uc), (e), (addro), (addrn))
# else
# define util_addrChange( uc,e, addro, addrn )
#endif
#define util_informWordsBlocked(uc,e, c, w, d) \
(uc)->vtable->m_util_informWordsBlocked( (uc), (e), (c), (w), (d) )

View file

@ -1688,7 +1688,6 @@ linuxFireTimer( CommonGlobals* cGlobals, XWTimerReason why )
return draw;
} /* linuxFireTimer */
#ifndef XWFEATURE_STANDALONE_ONLY
static void
linux_util_informMissing( XW_UtilCtxt* XP_UNUSED(uc), XWEnv XP_UNUSED(xwe),
XP_Bool XP_UNUSED_DBG(isServer),
@ -1702,43 +1701,6 @@ linux_util_informMissing( XW_UtilCtxt* XP_UNUSED(uc), XWEnv XP_UNUSED(xwe),
isServer, selfAddr, nDevs, nMissing, nInvited );
}
static void
linux_util_addrChange( XW_UtilCtxt* uc, XWEnv XP_UNUSED(xwe),
const CommsAddrRec* XP_UNUSED(oldAddr),
const CommsAddrRec* newAddr )
{
CommonGlobals* cGlobals = (CommonGlobals*)uc->closure;
CommsConnType typ;
for ( XP_U32 st = 0; addr_iter( newAddr, &typ, &st ); ) {
switch ( typ ) {
#ifdef XWFEATURE_BLUETOOTH
case COMMS_CONN_BT: {
XP_Bool isServer = game_getIsServer( &cGlobals->game );
linux_bt_open( cGlobals, isServer );
}
break;
#endif
#ifdef XWFEATURE_IP_DIRECT
case COMMS_CONN_IP_DIRECT:
linux_udp_open( cGlobals, newAddr );
break;
#endif
#ifdef XWFEATURE_SMS
case COMMS_CONN_SMS:
/* nothing to do??? */
// XP_ASSERT(0);
// linux_sms_init( cGlobals, newAddr );
break;
#endif
default:
// XP_ASSERT(0);
break;
}
}
}
#endif
unsigned int
makeRandomInt()
{
@ -2391,10 +2353,7 @@ void
setupLinuxUtilCallbacks( XW_UtilCtxt* util )
{
#define SET_PROC(NAM) util->vtable->m_util_##NAM = linux_util_##NAM
#ifndef XWFEATURE_STANDALONE_ONLY
SET_PROC(informMissing);
SET_PROC(addrChange);
#endif
SET_PROC(formatPauseHistory);
SET_PROC(setTimer);
SET_PROC(clearTimer);