mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix Linux build with C++20
src/game/client/components/chat.cpp: In lambda function: src/game/client/components/chat.cpp:686:33: error: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Werror=deprecated] 686 | auto &&FChatMsgCheckAndPrint = [=](CLine *pLine) { | ^ src/game/client/components/chat.cpp:686:33: note: add explicit ‘this’ or ‘*this’ capture
This commit is contained in:
parent
4c8e33ee8e
commit
1afd1a32d1
|
@ -683,7 +683,7 @@ void CChat::AddLine(int ClientID, int Team, const char *pLine)
|
|||
if(*p == 0)
|
||||
return;
|
||||
|
||||
auto &&FChatMsgCheckAndPrint = [=](CLine *pLine) {
|
||||
auto &&FChatMsgCheckAndPrint = [this](CLine *pLine) {
|
||||
if(pLine->m_ClientID < 0) // server or client message
|
||||
{
|
||||
if(Client()->State() != IClient::STATE_DEMOPLAYBACK)
|
||||
|
|
|
@ -1074,7 +1074,7 @@ void CGameClient::InvalidateSnapshot()
|
|||
|
||||
void CGameClient::OnNewSnapshot()
|
||||
{
|
||||
auto &&Evolve = [=](CNetObj_Character *pCharacter, int Tick) {
|
||||
auto &&Evolve = [this](CNetObj_Character *pCharacter, int Tick) {
|
||||
CWorldCore TempWorld;
|
||||
CCharacterCore TempCore;
|
||||
CTeamsCore TempTeams;
|
||||
|
|
Loading…
Reference in a new issue