cleanup clang-tidy/clazy warnings
This commit is contained in:
parent
e96ec6a6f3
commit
13c71afe1a
|
@ -67,7 +67,7 @@ void Appliance::UdpStreamHandler(PDU::Stream stream) {
|
||||||
if (stream->fail())
|
if (stream->fail())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(auto root : *block) {
|
for(auto const &root : *block) {
|
||||||
RlpReceiver(root);
|
RlpReceiver(root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ void Appliance::TcpStreamHandler(PDU::Stream stream) {
|
||||||
if (stream->fail())
|
if (stream->fail())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(auto root : *block) {
|
for(auto const &root : *block) {
|
||||||
RlpReceiver(root);
|
RlpReceiver(root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ void Appliance::TcpStreamHandler(PDU::Stream stream) {
|
||||||
void Appliance::RlpReceiver(std::shared_ptr<RLP::Pdu> root) {
|
void Appliance::RlpReceiver(std::shared_ptr<RLP::Pdu> root) {
|
||||||
if (!rlp_vectors_.count(root->vector()))
|
if (!rlp_vectors_.count(root->vector()))
|
||||||
return;
|
return;
|
||||||
for(auto handler : rlp_vectors_[root->vector()]) {
|
for(auto const &handler : rlp_vectors_[root->vector()]) {
|
||||||
handler(root);
|
handler(root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,10 @@ address_type::address_type(uint8_t val) {
|
||||||
width = (address_length)(val & 0b11);
|
width = (address_length)(val & 0b11);
|
||||||
}
|
}
|
||||||
|
|
||||||
range::range(PDU::Stream stream, data_type t, address_length l) {
|
range::range(PDU::Stream stream, data_type t, address_length l) :
|
||||||
|
incriment(0),
|
||||||
|
count(0)
|
||||||
|
{
|
||||||
address = read(stream, l);
|
address = read(stream, l);
|
||||||
if (t == SINGLE) return;
|
if (t == SINGLE) return;
|
||||||
incriment = read(stream, l);
|
incriment = read(stream, l);
|
||||||
|
|
|
@ -66,7 +66,7 @@ void Receiver::rootDataHandler(std::shared_ptr<RLP::Pdu> root) {
|
||||||
auto block = PDU::readBlock<DATA::Pdu>(root->buffer(), root);
|
auto block = PDU::readBlock<DATA::Pdu>(root->buffer(), root);
|
||||||
if (root->buffer()->fail())
|
if (root->buffer()->fail())
|
||||||
return;
|
return;
|
||||||
for(auto frame : *block) {
|
for(auto const &frame : *block) {
|
||||||
// 6.2.1 E1.31 Data Packet: Vector
|
// 6.2.1 E1.31 Data Packet: Vector
|
||||||
// Sources sending an E1.31 Data Packet shall set the E1.31 Layer's Vector
|
// Sources sending an E1.31 Data Packet shall set the E1.31 Layer's Vector
|
||||||
// to VECTOR_E131_DATA_PACKET. This value indicates that the E1.31 framing
|
// to VECTOR_E131_DATA_PACKET. This value indicates that the E1.31 framing
|
||||||
|
@ -160,7 +160,7 @@ void Receiver::dataPacketHandler(std::shared_ptr<DATA::Pdu> frame) {
|
||||||
auto block = PDU::readBlock<DMP::Pdu>(frame->buffer(), frame);
|
auto block = PDU::readBlock<DMP::Pdu>(frame->buffer(), frame);
|
||||||
if (frame->buffer()->fail())
|
if (frame->buffer()->fail())
|
||||||
return;
|
return;
|
||||||
for (auto dmp : *block) {
|
for (auto const &dmp : *block) {
|
||||||
// 7.2 DMP Layer: Vector
|
// 7.2 DMP Layer: Vector
|
||||||
// The DMP Layer's Vector shall be set to VECTOR_DMP_SET_PROPERTY, which
|
// The DMP Layer's Vector shall be set to VECTOR_DMP_SET_PROPERTY, which
|
||||||
// indicates a DMP Set Property message by sources. Receivers shall discard
|
// indicates a DMP Set Property message by sources. Receivers shall discard
|
||||||
|
|
Loading…
Reference in New Issue