more use of NonCopyable
This commit is contained in:
@@ -5,8 +5,10 @@
|
||||
* \brief File containing the blitz::network::EnetConnexion class
|
||||
*/
|
||||
|
||||
#include <Nazara/Core/ByteArray.hpp>
|
||||
#include <NazaraUtils/Signal.hpp>
|
||||
#include <blitz/protocol/PacketSerializer.h>
|
||||
#include <blitz/protocol/PacketData.h>
|
||||
#include <blitz/protocol/PacketDeclare.h>
|
||||
|
||||
namespace Nz {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class EnetServer : private NonCopyable {
|
||||
|
||||
void Destroy();
|
||||
|
||||
void BroadcastPacket(const protocol::Packet& a_Packet, Nz::ENetPacketFlags a_Flags);
|
||||
// void BroadcastPacket(const protocol::Packet& a_Packet, Nz::ENetPacketFlags a_Flags);
|
||||
|
||||
EnetConnexion* GetConnexion(std::uint16_t a_PeerId);
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace protocol {
|
||||
* \class PacketVisitor
|
||||
* \brief This class uses double-dispatch in order to find the real type of a packet
|
||||
*/
|
||||
class PacketVisitor {
|
||||
class PacketVisitor : private NonCopyable {
|
||||
protected:
|
||||
PacketVisitor() {}
|
||||
virtual ~PacketVisitor() {}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* \brief File containing the definitions of the packets
|
||||
*/
|
||||
|
||||
#include <blitz/common/NonCopyable.h>
|
||||
#include <blitz/protocol/PacketData.h>
|
||||
#include <blitz/protocol/PacketDeclare.h>
|
||||
|
||||
@@ -34,7 +35,7 @@ enum class PacketType : PacketID {
|
||||
#undef DeclarePacket
|
||||
|
||||
|
||||
class Packet {
|
||||
class Packet : private NonCopyable {
|
||||
public:
|
||||
/**
|
||||
* \return The real type of the packet
|
||||
|
||||
@@ -76,9 +76,9 @@ EnetConnexion* EnetServer::GetConnexion(std::uint16_t a_PeerId) {
|
||||
return &it->second;
|
||||
}
|
||||
|
||||
void EnetServer::BroadcastPacket(const protocol::Packet& a_Packet, Nz::ENetPacketFlags a_Flags) {
|
||||
// m_Host.Broadcast(0, a_Flags, std::move(a_Data));
|
||||
}
|
||||
/*void EnetServer::BroadcastPacket(const protocol::Packet& a_Packet, Nz::ENetPacketFlags a_Flags) {
|
||||
m_Host.Broadcast(0, a_Flags, std::move(a_Data));
|
||||
}*/
|
||||
|
||||
void EnetServer::RemoveConnexion(std::uint16_t a_PeerId) {
|
||||
m_Connexion.erase(a_PeerId);
|
||||
|
||||
Reference in New Issue
Block a user