MCPcopy Create free account
hub / github.com/ddnet/ddnet / Update

Method Update

src/engine/shared/netban.cpp:155–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153
154template<class T, int HashCount>
155void CNetBan::CBanPool<T, HashCount>::Update(CBan<CDataType> *pBan, const CBanInfo *pInfo)
156{
157 pBan->m_Info = *pInfo;
158
159 // remove from used list
160 if(pBan->m_pNext)
161 pBan->m_pNext->m_pPrev = pBan->m_pPrev;
162 if(pBan->m_pPrev)
163 pBan->m_pPrev->m_pNext = pBan->m_pNext;
164 else
165 m_pFirstUsed = pBan->m_pNext;
166
167 // insert it into the used list
168 InsertUsed(pBan);
169}
170
171void CNetBan::UnbanAll()
172{

Callers 1

BanMethod · 0.45

Calls 5

time_timestampFunction · 0.85
str_formatFunction · 0.85
FirstMethod · 0.45
PrintMethod · 0.45
RemoveMethod · 0.45

Tested by

no test coverage detected