-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
More cue hint for caching reader #4771
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8bdcede
Replace CachingReader Hint priorities by a type enum
daschuer 9cfe1eb
Introduce helper appendCueHint() to de-duplicate the code
daschuer d2a99b8
Add FirstSound, Intro and Outro to he hints for the CachingReader
daschuer 019e5e0
Check pHintList for null
daschuer f4cecb2
Use an initalizer list to populate the cue hint
daschuer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should rethink our "mutable references should be pointers" rule. Taking a value that could be
nullptr
and assuming its not is simply bad. Especially when the consequence of that assumption is a crash.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ancient rule causes lots of boilerplate extra code that might contain bugs. I have argued for years until giving up and moving on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It seems this "style-preference" (though IMO its much more than just a matter of style) is in the minority in the C++ community. Even ignoring the Google/Qt vs CppCoreGuidelines "controversy", the simple argument of type-safety (and the thus gained safety) suffices for a decision. The less "illegal" states your type has, the less you need to check before using it. With my Rust experience, whenever I see a pointer in C++, I'm thinking that's an intentional
Option<Box<T>>
so there is either something special going on with the actual presence of the contained value or its lifetime. Especially because its already trivial to express mutable "borrowing" in C++ by just using a mutable reference.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Original google styleguide says:
I have never even noticed this being an issue personally. I've struggled to find any arguments on this online, so I invite everyone to come up with their own example because I can neither think of nor find one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The null check is now in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But its not needed if one just used a mutable reference. And its not free either...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, If you assume that a reference cannot be null which is not the case. But anyway, that the Mixxx style, no need to discuss it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind if we continued this discussion on Zulip? It seems like the majority of mixxx devs is dissatisfied by this style and we'd like to transition away from it.