mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 06:53:10 +02:00
remove unused methods in PacketHeaders
This commit is contained in:
parent
9c792f00df
commit
5b0495db8e
2 changed files with 0 additions and 39 deletions
|
@ -32,34 +32,6 @@ const QSet<PacketType> NON_SOURCED_PACKETS = QSet<PacketType>()
|
|||
|
||||
const QSet<PacketType> RELIABLE_PACKETS = QSet<PacketType>();
|
||||
|
||||
int arithmeticCodingValueFromBuffer(const char* checkValue) {
|
||||
if (((uchar) *checkValue) < 255) {
|
||||
return *checkValue;
|
||||
} else {
|
||||
return 255 + arithmeticCodingValueFromBuffer(checkValue + 1);
|
||||
}
|
||||
}
|
||||
|
||||
int numBytesArithmeticCodingFromBuffer(const char* checkValue) {
|
||||
if (((uchar) *checkValue) < 255) {
|
||||
return 1;
|
||||
} else {
|
||||
return 1 + numBytesArithmeticCodingFromBuffer(checkValue + 1);
|
||||
}
|
||||
}
|
||||
|
||||
int packArithmeticallyCodedValue(int value, char* destination) {
|
||||
if (value < 255) {
|
||||
// less than 255, just pack our value
|
||||
destination[0] = (uchar) value;
|
||||
return 1;
|
||||
} else {
|
||||
// pack 255 and then recursively pack on
|
||||
((unsigned char*)destination)[0] = 255;
|
||||
return 1 + packArithmeticallyCodedValue(value - 255, destination + 1);
|
||||
}
|
||||
}
|
||||
|
||||
PacketVersion versionForPacketType(PacketType packetType) {
|
||||
switch (packetType) {
|
||||
case PacketType::EntityAdd:
|
||||
|
@ -123,10 +95,6 @@ QString nameForPacketType(PacketType packetType) {
|
|||
return QString("unexpected");
|
||||
}
|
||||
|
||||
int numBytesForArithmeticCodedPacketType(PacketType packetType) {
|
||||
return (int) ceilf((float) packetType / 255);
|
||||
}
|
||||
|
||||
uint qHash(const PacketType& key, uint seed) {
|
||||
// seems odd that Qt couldn't figure out this cast itself, but this fixes a compile error after switch to
|
||||
// strongly typed enum for PacketType
|
||||
|
|
|
@ -87,13 +87,6 @@ extern const QSet<PacketType> RELIABLE_PACKETS;
|
|||
QString nameForPacketType(PacketType packetType);
|
||||
PacketVersion versionForPacketType(PacketType packetType);
|
||||
|
||||
int numBytesForArithmeticCodedPacketType(PacketType packetType);
|
||||
int numBytesForPacketHeaderGivenPacketType(PacketType packetType);
|
||||
int packArithmeticallyCodedValue(int value, char* destination);
|
||||
|
||||
int arithmeticCodingValueFromBuffer(const char* checkValue);
|
||||
int numBytesArithmeticCodingFromBuffer(const char* checkValue);
|
||||
|
||||
uint qHash(const PacketType& key, uint seed);
|
||||
QDebug operator<<(QDebug debug, const PacketType& type);
|
||||
|
||||
|
|
Loading…
Reference in a new issue