NetPlayClient: const correctness
This commit is contained in:
parent
9604a06921
commit
025eac9062
|
@ -560,7 +560,7 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void NetPlayClient::Send(sf::Packet& packet)
|
||||
void NetPlayClient::Send(const sf::Packet& packet)
|
||||
{
|
||||
ENetPacket* epac =
|
||||
enet_packet_create(packet.getData(), packet.getDataSize(), ENET_PACKET_FLAG_RELIABLE);
|
||||
|
@ -1150,7 +1150,7 @@ int NetPlayClient::NumLocalPads() const
|
|||
}));
|
||||
}
|
||||
|
||||
int NetPlayClient::InGamePadToLocalPad(int ingame_pad)
|
||||
int NetPlayClient::InGamePadToLocalPad(int ingame_pad) const
|
||||
{
|
||||
// not our pad
|
||||
if (m_pad_map[ingame_pad] != m_local_player->pid)
|
||||
|
@ -1168,7 +1168,7 @@ int NetPlayClient::InGamePadToLocalPad(int ingame_pad)
|
|||
return local_pad;
|
||||
}
|
||||
|
||||
int NetPlayClient::LocalPadToInGamePad(int local_pad)
|
||||
int NetPlayClient::LocalPadToInGamePad(int local_pad) const
|
||||
{
|
||||
// Figure out which in-game pad maps to which local pad.
|
||||
// The logic we have here is that the local slots always
|
||||
|
|
|
@ -93,8 +93,8 @@ public:
|
|||
bool IsFirstInGamePad(int ingame_pad) const;
|
||||
int NumLocalPads() const;
|
||||
|
||||
int InGamePadToLocalPad(int ingame_pad);
|
||||
int LocalPadToInGamePad(int localPad);
|
||||
int InGamePadToLocalPad(int ingame_pad) const;
|
||||
int LocalPadToInGamePad(int localPad) const;
|
||||
|
||||
static void SendTimeBase();
|
||||
bool DoAllPlayersHaveGame();
|
||||
|
@ -156,7 +156,7 @@ private:
|
|||
void SendPadState(int in_game_pad, const GCPadStatus& np);
|
||||
void SendWiimoteState(int in_game_pad, const NetWiimote& nw);
|
||||
unsigned int OnData(sf::Packet& packet);
|
||||
void Send(sf::Packet& packet);
|
||||
void Send(const sf::Packet& packet);
|
||||
void Disconnect();
|
||||
bool Connect();
|
||||
void ComputeMD5(const std::string& file_identifier);
|
||||
|
|
Loading…
Reference in New Issue