From 5247c4855174bdfe3db741f8de18e54d37fb89da Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 31 Dec 2024 19:41:40 +1100 Subject: [PATCH] actually silence Clang unused warns [skip ci] --- source/core/StarNetElementFloatFields.hpp | 3 ++- source/game/StarNetPackets.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/core/StarNetElementFloatFields.hpp b/source/core/StarNetElementFloatFields.hpp index b8ec28f..44e0a89 100644 --- a/source/core/StarNetElementFloatFields.hpp +++ b/source/core/StarNetElementFloatFields.hpp @@ -165,7 +165,8 @@ bool NetElementFloating::writeNetDelta(DataStream& ds, uint64_t fromVersion, } template -void NetElementFloating::readNetDelta(DataStream& ds, float interpolationTime, NetCompatibilityRules _rules) { +void NetElementFloating::readNetDelta(DataStream& ds, float interpolationTime, NetCompatibilityRules rules) { + _unused(rules) T t = readValue(ds); m_latestUpdateVersion = m_netVersion ? m_netVersion->current() : 0; diff --git a/source/game/StarNetPackets.cpp b/source/game/StarNetPackets.cpp index e53f988..2e64eee 100644 --- a/source/game/StarNetPackets.cpp +++ b/source/game/StarNetPackets.cpp @@ -85,11 +85,11 @@ EnumMap const NetCompressionModeNames { Packet::~Packet() {} -void Packet::read(DataStream& ds, NetCompatibilityRules _netRules) { read(ds); } -void Packet::read(DataStream& _ds) {} -void Packet::write(DataStream& ds, NetCompatibilityRules _netRules) const { write(ds); } -void Packet::write(DataStream& _ds) const {} -void Packet::readJson(Json const& _json) {} +void Packet::read(DataStream& ds, NetCompatibilityRules netRules) { read(ds); _unused(netRules); } +void Packet::read(DataStream& ds) { _unused(ds); } +void Packet::write(DataStream& ds, NetCompatibilityRules netRules) const { write(ds); _unused(netRules); } +void Packet::write(DataStream& ds) const { _unused(ds); } +void Packet::readJson(Json const& json) { _unused(json); } Json Packet::writeJson() const { return JsonObject{}; } PacketCompressionMode Packet::compressionMode() const { return m_compressionMode; }