Skip to content

Commit

Permalink
切换为C++11 写法
Browse files Browse the repository at this point in the history
  • Loading branch information
mc373906408 committed Nov 17, 2023
1 parent 6d64d97 commit dec28a4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Network/UdpServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,16 @@ Session::Ptr UdpServer::createSession(const PeerIdType &id, const Buffer::Ptr &b
lock_guard<std::recursive_mutex> lck(*strong_self->_session_mutex);
strong_self->_session_map->erase(id);
//0.5s后自动删除
strong_self->_session_erase_map->emplace(id,std::make_unique<Timer>(0.5f,
strong_self->_session_erase_map->emplace(
id,
std::unique_ptr<Timer>(std::move(new Timer(

Check failure on line 297 in src/Network/UdpServer.cpp

View workflow job for this annotation

GitHub Actions / build

'std::move': no matching overloaded function found
0.5f,
[weak_self,id]() -> bool {
auto strong_self = weak_self.lock();
strong_self->_session_erase_map->erase(id);
return false;
},
_poller));
_poller))));

Check failure on line 304 in src/Network/UdpServer.cpp

View workflow job for this annotation

GitHub Actions / build

the usage of 'toolkit::Server::_poller' requires the compiler to capture 'this' but the current default capture mode does not allow it

Check failure on line 304 in src/Network/UdpServer.cpp

View workflow job for this annotation

GitHub Actions / build

'_poller': undeclared identifier

Check failure on line 304 in src/Network/UdpServer.cpp

View workflow job for this annotation

GitHub Actions / build

'_OutIt std::move(_InIt,_InIt,_OutIt)': expects 3 arguments - 1 provided
});

// 获取会话强应用
Expand Down

0 comments on commit dec28a4

Please sign in to comment.