Music service cleanup#428
Merged
JF002 merged 4 commits intoInfiniTimeOrg:developfrom Jul 2, 2021
Merged
Conversation
Collaborator
|
I plan on testing this, but not sure if I'll manage it within this week. |
Also added initializers for previously unintialized members.
3779133 to
0001347
Compare
Collaborator
|
Nice 👍 I like the way you replaced the macros by |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Avamander here are the changes I mentioned in #359 plus one or two other small improvements.
reinterpret_cast<ble_uuid_t*>ing by passing pointers to the first member of the UUID structs, which is able_uuid_t, instead of the struct itself.constexprfunctions that return UUID objects directly and used those to initialize them. Also moved these variables to static values in the source file since that's the only place they're referenced.MusicCallbackinto the anonymous namespace since it's also only referenced inside ofMusicService.cppAnother thing I was thinking of doing was adding a simple
operator==for the UUID objects, which would just callble_uuid_cmp. That would help make the if-chain inMusicService::OnCommanda lot cleaner to read.