hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.04k stars 173 forks source link

Refactor: More const refs and Playlist(Editor) overhaul #1955

Closed theGreatWhiteShark closed 5 months ago

theGreatWhiteShark commented 6 months ago

As it is almost a tradition by now, I do one bigger refactoring per minor release which went somewhat out of hand. 😄

It's main focus was to introduce more const and passing by (const) reference into our code base. Especially the parts of the code concerned with reading and writing XML files did profite a lot since it got more clear what will be changed and what is kept constant. (The only part I did not touched was the Note lifecycle and all corresponding signatures. There is too much to go wrong).

I also killed a singleton: the Playlist, which is now stored as a shared pointer in the Hydrogen class. But when looking at both Playlist and PlaylistEditor I couldn't resist rewriting large parts of them as they needed quite a lot of love.

In addition, the Synth class was dropped. As it basically just dead code.