-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various Builder ::EndOf* functions should probably return mError, not *this #8309
Labels
Comments
Yep, agree, would update this next week, thanks |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this issue
May 27, 2023
Simplifies consumers and makes it clearer you're not supposed to use the object any more after the EndOf... call. Fixes project-chip#8309
bzbarsky-apple
added a commit
to bzbarsky-apple/connectedhomeip
that referenced
this issue
May 27, 2023
Simplifies consumers and makes it clearer you're not supposed to use the object any more after the EndOf... call. Fixes project-chip#8309
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
An example.
ReadRequest::Builder & ReadRequest::Builder::EndOfReadRequest()
. So consumers have to use it like so:But if we're at the end, what's the point of returning
this
? We don't in fact want to have any more calls adding more things to our TLV at this point!Proposed Solution
If
EndOfReadRequest
returnedmError
, this would look like this:which seems a lot more natural and harder to misuse.
@yunhanw-google
The text was updated successfully, but these errors were encountered: