1
0
Fork 0

whitespace cleanup

This commit is contained in:
Kevin Matz 2023-05-18 15:50:13 -04:00
parent de346b15b4
commit 455ce23681
1 changed files with 16 additions and 16 deletions

View File

@ -107,13 +107,13 @@ struct Block
while(s->good()) {
auto p = std::make_shared<T>();
p->iStream(s);
if (s->fail()) // stream failed during pdu read
if (s->fail()) // stream failed during pdu read
break;
if (p->stream()->fail()) // pdu buffer failed
if (p->stream()->fail()) // pdu buffer failed
continue;
if (!pdu.empty()) // set inheritee
if (!pdu.empty()) // set inheritee
p->setInherit(pdu.back());
pdu.push_back(p); // add to block
pdu.push_back(p); // add to block
}
}
void oStream(Stream s) const override {
@ -134,11 +134,11 @@ struct pdu_flags
union {
uint8_t _raw = 0;
struct {
uint8_t lengthH : 4; //!< hightest 4 bytes of the PDU length, unused here
bool hasData : 1; //!< false if Pdu inherits it's data
bool hasHeader : 1; //!< false if Pdu inherits it's header
bool hasVector : 1; //!< false if Pdu inherits it's vector
bool hasLength : 1; //!< true if pdu length is > 0x0fff
uint8_t lengthH : 4; //!< hightest 4 bytes of the PDU length, unused here
bool hasData : 1; //!< false if Pdu inherits it's data
bool hasHeader : 1; //!< false if Pdu inherits it's header
bool hasVector : 1; //!< false if Pdu inherits it's vector
bool hasLength : 1; //!< true if pdu length is > 0x0fff
};
};
};
@ -163,9 +163,9 @@ public:
Pdu(size_t vector_size);
// getters
uint32_t vector(); // may inherit
std::shared_ptr<pdu_header> header(); // may inherit
std::shared_ptr<pdu_data> data(); // may inherit
uint32_t vector(); // may inherit
std::shared_ptr<pdu_header> header(); // may inherit
std::shared_ptr<pdu_data> data(); // may inherit
std::shared_ptr<Pdu> parent();
Stream stream();
virtual size_t streamSize() const override;
@ -187,9 +187,9 @@ public:
void createHeader()
{
if (!flags_.hasHeader)
return; // doesn't get a header segment, inherits
return; // doesn't get a header segment, inherits
if (header_)
return; // already has a header segment
return; // already has a header segment
header_ = std::make_shared<T>();
if (stream_ && stream_->good())
header_->iStream(stream_);
@ -201,9 +201,9 @@ public:
void createData()
{
if (!flags_.hasData)
return; // doesn't get a data segment, inherits
return; // doesn't get a data segment, inherits
if (data_)
return; // already has a data segment
return; // already has a data segment
data_ = std::make_shared<T>();
if (stream_ && stream_->good())
data_->iStream(stream_);