Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -14,8 +14,7 @@ using namespace std;
namespace
{
template <typename Container>
vector<uint8_t> CreateDataPacketImpl(Container const & points,
tracking::Protocol::PacketType const type)
vector<uint8_t> CreateDataPacketImpl(Container const & points, tracking::Protocol::PacketType const type)
{
vector<uint8_t> buffer;
MemWriter<decltype(buffer)> writer(buffer);
@@ -101,9 +100,7 @@ string Protocol::DecodeAuthPacket(Protocol::PacketType type, vector<uint8_t> con
case Protocol::PacketType::AuthV0: return string(begin(data), end(data));
case Protocol::PacketType::Error:
case Protocol::PacketType::DataV0:
case Protocol::PacketType::DataV1:
LOG(LERROR, ("Error decoding AUTH packet. PacketType =", type));
break;
case Protocol::PacketType::DataV1: LOG(LERROR, ("Error decoding AUTH packet. PacketType =", type)); break;
}
return string();
}
@@ -118,16 +115,10 @@ Protocol::DataElementsVec Protocol::DecodeDataPacket(PacketType type, vector<uin
{
switch (type)
{
case Protocol::PacketType::DataV0:
Encoder::DeserializeDataPoints(0 /* version */, src, points);
break;
case Protocol::PacketType::DataV1:
Encoder::DeserializeDataPoints(1 /* version */, src, points);
break;
case Protocol::PacketType::DataV0: Encoder::DeserializeDataPoints(0 /* version */, src, points); break;
case Protocol::PacketType::DataV1: Encoder::DeserializeDataPoints(1 /* version */, src, points); break;
case Protocol::PacketType::Error:
case Protocol::PacketType::AuthV0:
LOG(LERROR, ("Error decoding DATA packet. PacketType =", type));
return {};
case Protocol::PacketType::AuthV0: LOG(LERROR, ("Error decoding DATA packet. PacketType =", type)); return {};
}
return points;
}