Skip to content

Commit

Permalink
Fix some compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaffeine committed Oct 7, 2024
1 parent 18d71df commit 1a66384
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
7 changes: 2 additions & 5 deletions src/engine/shared/netban.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ class CNetBan

struct CBanInfo
{
enum
{
EXPIRES_NEVER = -1,
REASON_LENGTH = 64,
};
static constexpr int EXPIRES_NEVER = -1;
static constexpr std::size_t REASON_LENGTH = 64;
int m_Expires;
char m_aReason[REASON_LENGTH];
};
Expand Down
7 changes: 0 additions & 7 deletions src/game/server/gamecontext.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#include <new>

#include <base/logger.h>
#include <base/math.h>
#include <engine/shared/config.h>
Expand All @@ -16,7 +14,6 @@
#include <game/version.h>
#include <game/collision.h>
#include <game/gamecore.h>
#include <iostream>
#include <algorithm>

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

Server()->ExpireServerInfo();

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

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

Server()->SendPackMsg(&Msg, MSGFLAG_VITAL, i);

NumPlayerFound++;
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/game/server/infclass/entities/infccharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ void CInfClassCharacter::Tick()
return;
}

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

Expand Down
3 changes: 0 additions & 3 deletions src/game/server/infclass/events-director.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

#include <vector>

static const char WinterSuffix[] = "_winter";

enum class EventType
{
None,
Expand All @@ -19,7 +17,6 @@ enum class EventType
};

static EventType PreloadedMapEventType = EventType::None;
static char aEventId[32] = {0};

const char *EventsDirector::GetMapConverterId(const char *pConverterId)
{
Expand Down

0 comments on commit 1a66384

Please sign in to comment.