Skip to content
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

TrackDAO::saveTrack(): Return success/failure result #4603

Merged
merged 2 commits into from Jan 7, 2022
Merged

TrackDAO::saveTrack(): Return success/failure result #4603

merged 2 commits into from Jan 7, 2022

Conversation

uklotzde
Copy link
Contributor

@uklotzde uklotzde commented Jan 5, 2022

A straightforward refactoring to simplify the code. Makes the control and data flow explicit instead of implicitly relying on the result of side effects.

Boolean value because it is only an internal API.

@uklotzde
Copy link
Contributor Author

uklotzde commented Jan 5, 2022

The biggest refactoring affects TrackCollectionManager::saveTrack() were the 2 cases are now clearly separated from each other in a linear fashion. The 1st case (purge) actually only catches a very rare potential race condition.

Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

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

LGTM, much more readable IMHO. Thank you.

@uklotzde
Copy link
Contributor Author

uklotzde commented Jan 7, 2022

Ping

@Holzhaus Holzhaus merged commit 2db5d90 into mixxxdj:main Jan 7, 2022
@uklotzde uklotzde deleted the trackdao branch January 8, 2022 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants