event/ServerSocket: pass UniqueSocketDescriptor by value
Passing it by value is actually smaller (32 bit) than the rvalue reference (64 bit pointer), and it ensures that the object is consumed after the call returns, no matter how the methods are implemented.
This commit is contained in:
@@ -117,7 +117,7 @@ public:
|
||||
void Close();
|
||||
|
||||
protected:
|
||||
virtual void OnAccept(UniqueSocketDescriptor &&fd,
|
||||
virtual void OnAccept(UniqueSocketDescriptor fd,
|
||||
SocketAddress address, int uid) = 0;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user