mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:44:32 +02:00
int64_t to qint64 for consistency
This commit is contained in:
parent
01f1a6e2b9
commit
7e4999b717
3 changed files with 9 additions and 9 deletions
|
@ -11,13 +11,13 @@
|
|||
|
||||
#include "NLPacket.h"
|
||||
|
||||
int64_t NLPacket::localHeaderSize(PacketType::Value type) {
|
||||
int64_t size = ((NON_SOURCED_PACKETS.contains(type)) ? 0 : NUM_BYTES_RFC4122_UUID) +
|
||||
qint64 NLPacket::localHeaderSize(PacketType::Value type) {
|
||||
qint64 size = ((NON_SOURCED_PACKETS.contains(type)) ? 0 : NUM_BYTES_RFC4122_UUID) +
|
||||
((NON_VERIFIED_PACKETS.contains(type)) ? 0 : NUM_BYTES_RFC4122_UUID);
|
||||
return size;
|
||||
}
|
||||
|
||||
int64_t NLPacket::maxPayloadSize(PacketType::Value type) {
|
||||
qint64 NLPacket::maxPayloadSize(PacketType::Value type) {
|
||||
return Packet::maxPayloadSize(type) - localHeaderSize(type);
|
||||
}
|
||||
|
||||
|
@ -47,7 +47,7 @@ std::unique_ptr<NLPacket> NLPacket::createCopy(const NLPacket& other) {
|
|||
return std::unique_ptr<NLPacket>(new NLPacket(other));
|
||||
}
|
||||
|
||||
NLPacket::NLPacket(PacketType::Value type, int64_t size) : Packet(type, localHeaderSize(type) + size) {
|
||||
NLPacket::NLPacket(PacketType::Value type, qint64 size) : Packet(type, localHeaderSize(type) + size) {
|
||||
}
|
||||
|
||||
NLPacket::NLPacket(const NLPacket& other) : Packet(other) {
|
||||
|
|
|
@ -17,18 +17,18 @@
|
|||
class NLPacket : public Packet {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static std::unique_ptr<NLPacket> create(PacketType::Value type, int64_t size = -1);
|
||||
static std::unique_ptr<NLPacket> create(PacketType::Value type, qint64 size = -1);
|
||||
// Provided for convenience, try to limit use
|
||||
static std::unique_ptr<NLPacket> createCopy(const NLPacket& other);
|
||||
|
||||
static int64_t localHeaderSize(PacketType::Value type);
|
||||
static int64_t maxPayloadSize(PacketType::Value type);
|
||||
static qint64 localHeaderSize(PacketType::Value type);
|
||||
static qint64 maxPayloadSize(PacketType::Value type);
|
||||
|
||||
virtual qint64 totalHeadersSize() const; // Cumulated size of all the headers
|
||||
virtual qint64 localHeaderSize() const; // Current level's header size
|
||||
|
||||
protected:
|
||||
NLPacket(PacketType::Value type, int64_t size);
|
||||
NLPacket(PacketType::Value type, qint64 size);
|
||||
NLPacket(const NLPacket& other);
|
||||
|
||||
void setSourceUuid(QUuid sourceUuid);
|
||||
|
|
|
@ -23,7 +23,7 @@ class Packet : public QIODevice {
|
|||
public:
|
||||
using SequenceNumber = uint16_t;
|
||||
|
||||
static std::unique_ptr<Packet> create(PacketType::Value type, int64_t size = -1);
|
||||
static std::unique_ptr<Packet> create(PacketType::Value type, qint64 size = -1);
|
||||
// Provided for convenience, try to limit use
|
||||
static std::unique_ptr<Packet> createCopy(const Packet& other);
|
||||
|
||||
|
|
Loading…
Reference in a new issue