make NLPacket copy take const, fix get in SPH

This commit is contained in:
Stephen Birarda 2015-07-09 11:24:58 -07:00
parent bd9b42bd4c
commit 6d2fea4426
3 changed files with 3 additions and 3 deletions

View file

@ -44,7 +44,7 @@ std::unique_ptr<NLPacket> NLPacket::createCopy(const NLPacket& other) {
NLPacket::NLPacket(PacketType::Value type, int64_t size) : Packet(type, localHeaderSize(type) + size) { NLPacket::NLPacket(PacketType::Value type, int64_t size) : Packet(type, localHeaderSize(type) + size) {
} }
NLPacket::NLPacket(NLPacket& other) : Packet(other) { NLPacket::NLPacket(const NLPacket& other) : Packet(other) {
} }
void NLPacket::setSourceUuid(QUuid sourceUuid) { void NLPacket::setSourceUuid(QUuid sourceUuid) {

View file

@ -29,7 +29,7 @@ public:
protected: protected:
NLPacket(PacketType::Value type, int64_t size); NLPacket(PacketType::Value type, int64_t size);
NLPacket(NLPacket& other); NLPacket(const NLPacket& other);
void setSourceUuid(QUuid sourceUuid); void setSourceUuid(QUuid sourceUuid);
void setConnectionUuid(QUuid connectionUuid); void setConnectionUuid(QUuid connectionUuid);

View file

@ -49,5 +49,5 @@ const NLPacket& SentPacketHistory::getPacket(uint16_t sequenceNumber) const {
seqDiff += UINT16_RANGE; seqDiff += UINT16_RANGE;
} }
return *_sentPackets.get(seqDiff).get(); return *_sentPackets.get(seqDiff)->get();
} }