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

[Code Cleanup] Cleaned up some header files and move a bit of debugging logic to cmake #7677

Draft
wants to merge 63 commits into
base: master
Choose a base branch
from

Conversation

Rossmaxx
Copy link
Contributor

@Rossmaxx Rossmaxx commented Feb 2, 2025

  • Renamed the lmms_basics.h to LmmsTypes.h and scoped it down for that purpose.
  • Shifted the LMMS_STRINGIFY macro to it's own header.
  • Removed the debug.h header file and use cmake handle the macro logic.
  • Remove some unused headers
  • Removed SharedObject and use std::shared_ptr instead
  • Move constants used by the spectrum analyser to it's own header.

@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Feb 2, 2025

I am still not sure about copy pasting the macro directly to the other places but the "modern" methods I looked at to implement this functionality turned out to be very janky compared to this simple macro.

@Rossmaxx Rossmaxx changed the title Cleanup lmms_basics.h and simplify the LMMS_STRINGIFY macro to be used at call sites. Rename lmms_basics.h and scope it down to type declaration Feb 14, 2025
@Rossmaxx
Copy link
Contributor Author

Do note that the diff itself is small. Most of the thing is due to the file rename in the #include statement

@Rossmaxx Rossmaxx marked this pull request as ready for review February 14, 2025 15:32
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Feb 14, 2025

Now i should hunt down any unused includes over here, but I don't really have the insanity to do that manually.

@Rossmaxx
Copy link
Contributor Author

I'll fix the declaration later.

@Rossmaxx
Copy link
Contributor Author

Seems like I got myself into a rabbit hole with this refactoring

@Rossmaxx Rossmaxx changed the title Rename lmms_basics.h and scope it down to type declaration [Code Cleanup] Cleaned up some header files and move a bit of debugging logic to cmake Feb 22, 2025
@Rossmaxx
Copy link
Contributor Author

I'm done now.

@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 1, 2025

@messmerd Am i doing the SharedObject -> std::shared_ptr transition right, can you check and tell?

tresf and others added 4 commits March 1, 2025 12:32
Switches nightly builds from 20.04 to 22.04
Switches from container to actions-native runner
* add templates for common geometric constants

* oops missed one

* LD_2PI -> LD_PI

i re-added the wrong constant ffs

* CamelCase names and also verify compilation without -DLMMS_MINIMAL

* C++20 stuff

Updated to account for `<numbers>` and C++20:
- Marked all `lmms_constants.h` constants with an exact equivalent in `<numbers>` as deprecated
- Removed all `lmms_constants.h` constants where no variant is currently in use
- Using `inline constexpr`
- Using `std::floating_point` concept instead of `typename`

* add lmms::numbers namespace

* Remove panning_constants.h

Moves the four constants in panning_constants.h into panning.h, then
removes panning.h.

* Use std::exp(n) instead of powf(numbers::e, n)

* Use C++ std math functions

Co-authored-by: Dalton Messmer <[email protected]>

* Use overloaded std math functions

An attempt to fix compiler warnings on some platforms

* Remove uses of __USE_XOPEN

And also update two functions I missed from the previous commit

* Missed a few

* Fix ANOTHER std math function use

Of course there's another one

---------

Co-authored-by: Dalton Messmer <[email protected]>
Switch mingw64 from Ubuntu 20.04 to Ubuntu 24.04
…S#7681)

* SharedMemory: Make key optional, shorter on macOS
* Add getters for shared memory size
* macOS: Fix linking regression for RemoteZynAddSubFx introduced with LMMS#7252 

---------

Co-authored-by: Dalton Messmer <[email protected]>
@Rossmaxx Rossmaxx force-pushed the clean-lmms-basics branch from dff51ab to 9e25b29 Compare March 1, 2025 07:09
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 1, 2025

ahh crap, i messed up a rebase

@Rossmaxx Rossmaxx marked this pull request as draft March 1, 2025 07:10
@Rossmaxx
Copy link
Contributor Author

Rossmaxx commented Mar 1, 2025

I'll fix stuff later

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.

8 participants