Skip to content

Commit 1a66384

Browse files
committed
Fix some compilation warnings
1 parent 18d71df commit 1a66384

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

src/engine/shared/netban.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,8 @@ class CNetBan
7575

7676
struct CBanInfo
7777
{
78-
enum
79-
{
80-
EXPIRES_NEVER = -1,
81-
REASON_LENGTH = 64,
82-
};
78+
static constexpr int EXPIRES_NEVER = -1;
79+
static constexpr std::size_t REASON_LENGTH = 64;
8380
int m_Expires;
8481
char m_aReason[REASON_LENGTH];
8582
};

src/game/server/gamecontext.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
22
/* If you are missing that file, acquire a complete release at teeworlds.com. */
3-
#include <new>
4-
53
#include <base/logger.h>
64
#include <base/math.h>
75
#include <engine/shared/config.h>
@@ -16,7 +14,6 @@
1614
#include <game/version.h>
1715
#include <game/collision.h>
1816
#include <game/gamecore.h>
19-
#include <iostream>
2017
#include <algorithm>
2118

2219
#include <game/server/entities/character.h>
@@ -1792,7 +1789,6 @@ void CGameContext::OnClientEnter(int ClientId)
17921789

17931790
Server()->ExpireServerInfo();
17941791

1795-
CPlayer *pNewPlayer = m_apPlayers[ClientId];
17961792
mem_zero(&m_aLastPlayerInput[ClientId], sizeof(m_aLastPlayerInput[ClientId]));
17971793
m_aPlayerHasInput[ClientId] = false;
17981794
}
@@ -3794,7 +3790,6 @@ void CGameContext::PrivateMessage(const char* pStr, int ClientId, bool TeamChat)
37943790
Msg.m_Team = (TeamChat ? 1 : 0);
37953791
Msg.m_ClientId = ClientId;
37963792

3797-
int NumPlayerFound = 0;
37983793
for(int i=0; i<MAX_CLIENTS; i++)
37993794
{
38003795
if(m_apPlayers[i] && !CGameContext::m_ClientMuted[i][ClientId])
@@ -3853,8 +3848,6 @@ void CGameContext::PrivateMessage(const char* pStr, int ClientId, bool TeamChat)
38533848
Msg.m_pMessage = FinalMessage.buffer();
38543849

38553850
Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, i);
3856-
3857-
NumPlayerFound++;
38583851
}
38593852
}
38603853
}

src/game/server/infclass/entities/infccharacter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ void CInfClassCharacter::Tick()
213213
return;
214214
}
215215

216-
const vec2 PrevPos = m_Core.m_Pos;
217216
const int CurrentTick = Server()->Tick();
218217
GameController()->HandleCharacterTiles(this);
219218

src/game/server/infclass/events-director.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
#include <vector>
1111

12-
static const char WinterSuffix[] = "_winter";
13-
1412
enum class EventType
1513
{
1614
None,
@@ -19,7 +17,6 @@ enum class EventType
1917
};
2018

2119
static EventType PreloadedMapEventType = EventType::None;
22-
static char aEventId[32] = {0};
2320

2421
const char *EventsDirector::GetMapConverterId(const char *pConverterId)
2522
{

0 commit comments

Comments
 (0)