From 12ac4bf95b43e997c0ccbb62c0afcd1072d765e2 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:40:50 +0800 Subject: [PATCH] [raknet] Remove `RPCMap::RemoveNode(...)` --- raknet/RPCMap.cpp | 14 -------------- raknet/RPCMap.h | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/raknet/RPCMap.cpp b/raknet/RPCMap.cpp index 689c5ff..97f8f6f 100644 --- a/raknet/RPCMap.cpp +++ b/raknet/RPCMap.cpp @@ -151,17 +151,3 @@ void RPCMap::AddIdentifierAtIndex(char *uniqueIdentifier, RPCIndex insertionInde } } -void RPCMap::RemoveNode(char *uniqueIdentifier) -{ - unsigned index; - index=GetIndexFromFunctionName(uniqueIdentifier); - #ifdef _DEBUG - assert(index!=UNDEFINED_RPC_INDEX); // If this hits then the user was removing an RPC call that wasn't currently registered - #endif - RPCNode *node; - node = rpcSet[index]; - delete [] node->uniqueIdentifier; - delete node; - rpcSet[index]=0; -} - diff --git a/raknet/RPCMap.h b/raknet/RPCMap.h index 978c40e..c3d1470 100644 --- a/raknet/RPCMap.h +++ b/raknet/RPCMap.h @@ -39,7 +39,7 @@ public: RPCIndex GetIndexFromFunctionName(char *uniqueIdentifier); void AddIdentifierWithFunction(char *uniqueIdentifier, void *functionPointer, bool isPointerToMember); void AddIdentifierAtIndex(char *uniqueIdentifier, RPCIndex insertionIndex); - void RemoveNode(char *uniqueIdentifier); + protected: DataStructures::List rpcSet; };