Skip to content

Commit

Permalink
Correct the compilation warning messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
PioLing committed Jul 4, 2024
1 parent 6abe262 commit d1c6702
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Network/TcpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void TcpClient::onSockConnect(const SockException &ex) {
return true;
});

sock_ptr->setOnRead([weak_self, sock_ptr](const Buffer::Ptr &pBuf, struct sockaddr *, int) {
sock_ptr->setOnRead([weak_self, sock_ptr](Buffer::Ptr &pBuf, struct sockaddr *, int) {
auto strong_self = weak_self.lock();
if (!strong_self) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Network/TcpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Session::Ptr TcpServer::onAcceptConnection(const Socket::Ptr &sock) {

weak_ptr<Session> weak_session = session;
//会话接收数据事件
sock->setOnRead([weak_session](const Buffer::Ptr &buf, struct sockaddr *, int) {
sock->setOnRead([weak_session](Buffer::Ptr &buf, struct sockaddr *, int) {
//获取会话强应用
auto strong_session = weak_session.lock();
if (!strong_session) {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pingpong.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ int main(int argc,char *argv[]){
socket->setOnErr([](const SockException &err){
WarnL << err.what();
});
socket->setOnRead([interval,socket](const Buffer::Ptr &buffer, struct sockaddr *addr , int addr_len){
socket->setOnRead([interval,socket](Buffer::Ptr &buffer, struct sockaddr *addr , int addr_len){
if(!interval){
socket->send(buffer);
}
Expand Down

0 comments on commit d1c6702

Please sign in to comment.