Made CommandPacket const reference in writers

This commit is contained in:
Jordan Cristiano 2015-06-18 20:38:17 -04:00
parent 8be05db10d
commit f4cd7f96e2
4 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@ public:
virtual void StartWriting(demoheader_t& header) override final; virtual void StartWriting(demoheader_t& header) override final;
virtual void EndWriting() override final; virtual void EndWriting() override final;
virtual void StartCommandPacket(CommandPacket& packet) override final; virtual void StartCommandPacket(const CommandPacket& packet) override final;
virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) override final; virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) override final;
virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) override final; virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) override final;
@ -47,7 +47,7 @@ void ConLogWriter::EndWriting()
fflush(stdout); fflush(stdout);
} }
void ConLogWriter::StartCommandPacket(CommandPacket& packet) void ConLogWriter::StartCommandPacket(const CommandPacket& packet)
{ {
} }

View File

@ -17,7 +17,7 @@ public:
virtual void StartWriting(demoheader_t& header) override final; virtual void StartWriting(demoheader_t& header) override final;
virtual void EndWriting() override final; virtual void EndWriting() override final;
virtual void StartCommandPacket(CommandPacket& packet) override final; virtual void StartCommandPacket(const CommandPacket& packet) override final;
virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) override final; virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) override final;
virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) override final; virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) override final;
@ -49,7 +49,7 @@ void DemoWriter::EndWriting()
{ {
} }
void DemoWriter::StartCommandPacket(CommandPacket& packet) void DemoWriter::StartCommandPacket(const CommandPacket& packet)
{ {
m_writer.WriteCmdHeader(packet.cmd, packet.tick); m_writer.WriteCmdHeader(packet.cmd, packet.tick);
DemHandlers::DemMsg_FileWrite(packet.cmd, m_writer, packet.data); DemHandlers::DemMsg_FileWrite(packet.cmd, m_writer, packet.data);

View File

@ -37,7 +37,7 @@ public:
virtual void StartWriting(demoheader_t& header) = 0; virtual void StartWriting(demoheader_t& header) = 0;
virtual void EndWriting() = 0; virtual void EndWriting() = 0;
virtual void StartCommandPacket(CommandPacket& packet) = 0; virtual void StartCommandPacket(const CommandPacket& packet) = 0;
virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) = 0; virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) = 0;
virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) = 0; virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) = 0;

View File

@ -10,7 +10,7 @@ public:
virtual void StartWriting(demoheader_t& header) override final; virtual void StartWriting(demoheader_t& header) override final;
virtual void EndWriting() override final; virtual void EndWriting() override final;
virtual void StartCommandPacket(CommandPacket& packet) override final; virtual void StartCommandPacket(const CommandPacket& packet) override final;
virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) override final; virtual void EndCommandPacket(const PacketTrailingBits& trailingBits) override final;
virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) override final; virtual void WriteNetPacket(NetPacket& packet, SourceGameContext& context) override final;
@ -33,7 +33,7 @@ void JsonWriter::EndWriting()
{ {
} }
void JsonWriter::StartCommandPacket(CommandPacket& packet) void JsonWriter::StartCommandPacket(const CommandPacket& packet)
{ {
} }