Skip to content

Conversation

@peternewman
Copy link
Member

No description provided.

(cherry picked from commit 93253cd)
(cherry picked from commit d294042)
(cherry picked from commit d4378b9)
(cherry picked from commit e1e94e3)
Still needs some tests added...

(cherry picked from commit a5ddef0)
@peternewman peternewman added this to the 0.11.0 milestone Apr 12, 2024
@peternewman peternewman requested a review from kripton April 12, 2024 08:54
Copy link
Member

@kripton kripton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see inline comments

/*
* Size of the header portion.
*/
unsigned int BrokerClientEntryRPTPDU::HeaderSize() const {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the inline keyword would probably make perfect sense here. However, one could also keep the code clean and let the compiler make the best decisions. Same for the next function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll push it to the main PR as if we were to do it, we should do it for all PDUs.

I assume there shouldn't be any knock-ons with the inheritance etc?

void BrokerClientEntryRPTPDU::PackHeader(OutputStream *stream) const {
BrokerClientEntryHeader::broker_client_entry_pdu_header header;
m_header.ClientCid().Pack(header.client_cid);
stream->Write(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's hope 'stream' is not null here ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per the previous, for now I'll park this, PDU::Pack which is the only code that calls PackHeader/PackData has protection now. I guess we can add it to ALL PackHeader/PackData in one go if we deem it useful.

@peternewman peternewman mentioned this pull request Apr 13, 2024
8 tasks
@peternewman
Copy link
Member Author

It's finally actually passing the tests too! Please take a final look @kripton !

Copy link
Member

@kripton kripton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review done

@kripton
Copy link
Member

kripton commented Apr 14, 2024

... and the compilation checks also look much better now

@peternewman peternewman merged commit 0fff671 into OpenLightingProject:master Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants