Feb 15, 2012 at 2:57am UTC
While looking at some of the code for RakNet, I've seen code like this:
virtual void PreDestruction(RakNet::Connection_RM3 *sourceConnection){(void ) sourceConnection;}
all over the place, but I've never seen this before. Is this some special syntax for deleting an object, or what? (Referring to the definition of the method)
Last edited on Feb 15, 2012 at 2:57am UTC
Feb 15, 2012 at 3:45am UTC
Are you referring to this (void ) sourceConnection;
? That code does nothing. I think it's just used to suppress warnings about unused parameter.
Feb 15, 2012 at 4:01am UTC
Really? I've never seen that before, I didn't know you could use it like that. Thanks.