[raknet] Remove RPCMap::RemoveNode(...)

This commit is contained in:
RD42 2024-08-19 21:40:50 +08:00
parent 1af47512f6
commit 12ac4bf95b
2 changed files with 1 additions and 15 deletions

View File

@ -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;
}

View File

@ -39,7 +39,7 @@ public:
RPCIndex GetIndexFromFunctionName(char *uniqueIdentifier); RPCIndex GetIndexFromFunctionName(char *uniqueIdentifier);
void AddIdentifierWithFunction(char *uniqueIdentifier, void *functionPointer, bool isPointerToMember); void AddIdentifierWithFunction(char *uniqueIdentifier, void *functionPointer, bool isPointerToMember);
void AddIdentifierAtIndex(char *uniqueIdentifier, RPCIndex insertionIndex); void AddIdentifierAtIndex(char *uniqueIdentifier, RPCIndex insertionIndex);
void RemoveNode(char *uniqueIdentifier);
protected: protected:
DataStructures::List<RPCNode *> rpcSet; DataStructures::List<RPCNode *> rpcSet;
}; };