mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-20 02:11:28 +10:00
add a .clang-format file (#9154)
This commit is contained in:
@@ -4,20 +4,16 @@
|
||||
|
||||
DecodedServiceEnvelope::DecodedServiceEnvelope(const uint8_t *payload, size_t length)
|
||||
: meshtastic_ServiceEnvelope(meshtastic_ServiceEnvelope_init_default),
|
||||
validDecode(pb_decode_from_bytes(payload, length, &meshtastic_ServiceEnvelope_msg, this))
|
||||
{
|
||||
}
|
||||
validDecode(pb_decode_from_bytes(payload, length, &meshtastic_ServiceEnvelope_msg, this)) {}
|
||||
|
||||
DecodedServiceEnvelope::DecodedServiceEnvelope(DecodedServiceEnvelope &&other)
|
||||
: meshtastic_ServiceEnvelope(meshtastic_ServiceEnvelope_init_zero), validDecode(other.validDecode)
|
||||
{
|
||||
std::swap(packet, other.packet);
|
||||
std::swap(channel_id, other.channel_id);
|
||||
std::swap(gateway_id, other.gateway_id);
|
||||
: meshtastic_ServiceEnvelope(meshtastic_ServiceEnvelope_init_zero), validDecode(other.validDecode) {
|
||||
std::swap(packet, other.packet);
|
||||
std::swap(channel_id, other.channel_id);
|
||||
std::swap(gateway_id, other.gateway_id);
|
||||
}
|
||||
|
||||
DecodedServiceEnvelope::~DecodedServiceEnvelope()
|
||||
{
|
||||
if (validDecode)
|
||||
pb_release(&meshtastic_ServiceEnvelope_msg, this);
|
||||
DecodedServiceEnvelope::~DecodedServiceEnvelope() {
|
||||
if (validDecode)
|
||||
pb_release(&meshtastic_ServiceEnvelope_msg, this);
|
||||
}
|
||||
Reference in New Issue
Block a user