优化代码

空构造和析构函数替换为缺省
去除多余分号
This commit is contained in:
xiongziliang
2023-04-22 21:59:26 +08:00
parent e8a425945d
commit 7a95c87a29
21 changed files with 50 additions and 57 deletions

View File

@@ -82,7 +82,7 @@ template<typename Creator, typename HttpSessionType = mediakit::HttpSession, med
class WebSocketSessionBase : public HttpSessionType {
public:
WebSocketSessionBase(const toolkit::Socket::Ptr &pSock) : HttpSessionType(pSock){}
virtual ~WebSocketSessionBase(){}
virtual ~WebSocketSessionBase() = default;
//收到eof或其他导致脱离TcpServer事件的回调
void onError(const toolkit::SockException &err) override{
@@ -248,7 +248,7 @@ template<typename SessionType,typename HttpSessionType = mediakit::HttpSession,
class WebSocketSession : public WebSocketSessionBase<SessionCreator<SessionType>,HttpSessionType,DataType>{
public:
WebSocketSession(const toolkit::Socket::Ptr &pSock) : WebSocketSessionBase<SessionCreator<SessionType>,HttpSessionType,DataType>(pSock){}
virtual ~WebSocketSession(){}
virtual ~WebSocketSession() = default;
};
#endif //ZLMEDIAKIT_WEBSOCKETSESSION_H