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

Port the Sequencer to C++11 #1011

Closed
wants to merge 4 commits into from
Closed

Port the Sequencer to C++11 #1011

wants to merge 4 commits into from

Conversation

derselbst
Copy link
Member

@derselbst derselbst commented Dec 21, 2021

This is an MVP-like example of how a port of fluidsynth to C++11 may look like. See related discussion #847.

TODOs

  • restructure extern C crap to fix MacOS build
  • MinGW fails to compile (could be related to https://stackoverflow.com/a/17986785)
  • better integration of fluid_seq_queue
  • remove std::find_if code duplication

Update: In the discussion I mentioned that porting to C++ will keep the API stable. This may not completely hold true:

  • At least one function in the sequencer currently returns char* – in C++ this function must return a const char* (must have)
  • Many functions in the sequencer currently return void – since in C++ an exception may be thrown pretty much everywhere, it would be helpful when those functions would return FLUID_OK / FLUID_FAILED (nice-to-have though)

However, I'd consider those API changes to be pretty cosmetic though.

Removing elements from a vector while using iterators to loop over its elements results in crash.
@derselbst derselbst requested a review from mawe42 December 21, 2021 15:46
fluid_event_callback_t callback;
void *data;
} fluid_sequencer_client_t;

/* Private data for SEQUENCER */
struct _fluid_sequencer_t
Copy link
Contributor

Choose a reason for hiding this comment

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

prob want to add "final" to these struct _fluid_sequencer_t final

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe, I'll think about it.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

58.8% 58.8% Coverage
0.0% 0.0% Duplication

@derselbst derselbst closed this May 29, 2022
@derselbst derselbst deleted the sequencer-cxx11 branch May 29, 2022 12:59
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