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

[MU4] Use std::gcd() #11560

Merged
merged 2 commits into from
May 9, 2022
Merged

[MU4] Use std::gcd() #11560

merged 2 commits into from
May 9, 2022

Conversation

Jojo-Schmitz
Copy link
Contributor

@Jojo-Schmitz Jojo-Schmitz commented May 7, 2022

Use C++17's std::gcd() rather than our own implementation.

and return from creating an invalid tuplet early, this should fix https://musescore.org/en/node/331840, "Creating a 4-or-higher tuplet on a 512th or an 8-or-higher tuplet on a 256th crashes Musescore", it at least prevents the crash.
It does not bring up the "Tuplet too short" dialog though, for that see musescore#11561.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 7, 2022
 or an 8-or-higher tuplet on a 256th

Sort of a backport of musescore#11560 (without the `std::gcd()` part) and musescore#11561.
@igorkorsukov igorkorsukov merged commit 9e49e26 into musescore:master May 9, 2022
@Jojo-Schmitz Jojo-Schmitz deleted the std-gcd branch May 9, 2022 07:15
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request May 12, 2022
 or an 8-or-higher tuplet on a 256th

Sort of a backport of musescore#11560 (without the `std::gcd()` part) and musescore#11561.
Jojo-Schmitz added a commit to Jojo-Schmitz/MuseScore that referenced this pull request Mar 5, 2023
 or an 8-or-higher tuplet on a 256th

Sort of a backport of musescore#11560 (without the `std::gcd()` part) and musescore#11561.
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