fix Android warnings
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
|
||||
|
||||
@@ -41,28 +41,28 @@ class Connexion : public protocol::PacketHandler, private NonCopyable {
|
||||
|
||||
/**
|
||||
* \brief Default destructor
|
||||
*/
|
||||
*/
|
||||
virtual ~Connexion();
|
||||
|
||||
/**
|
||||
* \brief Reads socket and process a Packet, if any
|
||||
*/
|
||||
* \brief Reads socket and process a Packet, if any
|
||||
*/
|
||||
virtual bool UpdateSocket();
|
||||
|
||||
|
||||
/**
|
||||
* \brief Closes the connexion
|
||||
*/
|
||||
*/
|
||||
void CloseConnection();
|
||||
|
||||
/**
|
||||
* \brief Tries to connect the socket at the specified address and port
|
||||
* \return Wether this action was succesfull
|
||||
*/
|
||||
virtual bool Connect(const std::string& address, std::uint16_t port);
|
||||
*/
|
||||
bool Connect(const std::string& address, std::uint16_t port);
|
||||
|
||||
/**
|
||||
* \brief Returns the TCPSocket::Status of the internal socket
|
||||
*/
|
||||
*/
|
||||
TCPSocket::Status GetSocketStatus() const {
|
||||
return m_Socket.GetStatus();
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class Connexion : public protocol::PacketHandler, private NonCopyable {
|
||||
/**
|
||||
* \brief Sends the protocol::Packet over the network to the remote
|
||||
* \param packet The protocol::Packet to send
|
||||
*/
|
||||
*/
|
||||
void SendPacket(const protocol::Packet* packet);
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class ClientConnexion : public network::Connexion {
|
||||
virtual void HandlePacket(const protocol::ChatPacket* packet) override;
|
||||
virtual void HandlePacket(const protocol::ConnexionInfoPacket* packet) override;
|
||||
|
||||
virtual bool Connect(const std::string& pseudo, const std::string& address, std::uint16_t port);
|
||||
bool Connect(const std::string& pseudo, const std::string& address, std::uint16_t port);
|
||||
|
||||
game::PlayerID GetPlayerID() const {
|
||||
return m_PlayerID;
|
||||
|
||||
@@ -32,8 +32,8 @@ class ClientGame : public game::Game, public protocol::PacketHandler {
|
||||
virtual void HandlePacket(const protocol::UpdateGameStatePacket* packet) override;
|
||||
virtual void HandlePacket(const protocol::ServerConfigPacket* packet) override;
|
||||
|
||||
virtual void AddPlayer(game::PlayerID player, const std::string& name);
|
||||
virtual void RemovePlayer(game::PlayerID player);
|
||||
virtual void AddPlayer(game::PlayerID player, const std::string& name) override;
|
||||
virtual void RemovePlayer(game::PlayerID player) override;
|
||||
|
||||
const game::LeaderBoard& GetLeaderBoard() const {
|
||||
return m_LeaderBoard;
|
||||
|
||||
@@ -26,7 +26,8 @@ class GameChatGui : public GuiWidget, game::ClientListener {
|
||||
|
||||
public:
|
||||
GameChatGui(GuiWidget* parent, Client* client);
|
||||
virtual void OnTextChatReceived(const protocol::ColoredText& text);
|
||||
|
||||
virtual void OnTextChatReceived(const protocol::ColoredText& text) override;
|
||||
|
||||
virtual void Render() override;
|
||||
};
|
||||
|
||||
@@ -28,7 +28,6 @@ class BulletRenderer {
|
||||
std::vector<Trail> m_Trails;
|
||||
ModelLoader::Model m_BulletModel;
|
||||
std::unique_ptr<shader::BulletShader> m_Shader;
|
||||
unsigned int m_Vbo;
|
||||
const Camera& m_Camera;
|
||||
|
||||
public:
|
||||
|
||||
@@ -48,7 +48,7 @@ class ServerConnexion : public network::Connexion {
|
||||
return m_ID;
|
||||
}
|
||||
|
||||
virtual bool UpdateSocket();
|
||||
virtual bool UpdateSocket() override;
|
||||
|
||||
private:
|
||||
void RegisterHandlers();
|
||||
|
||||
@@ -105,7 +105,7 @@ void Server::Accept() {
|
||||
if (m_Listener.Accept(newSocket)) {
|
||||
game::PlayerID newPlayerID = GetNewPlayerID();
|
||||
auto con = std::make_unique<ServerConnexion>(this, newSocket, newPlayerID);
|
||||
m_Connections.insert(std::move(ConnexionMap::value_type{newPlayerID, std::move(con)}));
|
||||
m_Connections.insert(ConnexionMap::value_type{newPlayerID, std::move(con)});
|
||||
m_Connections[newPlayerID]->Start();
|
||||
newPlayerID++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user