Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Improve initializer/finalizer code #1046

Merged
merged 21 commits into from
May 14, 2023
Merged

Improve initializer/finalizer code #1046

merged 21 commits into from
May 14, 2023

Conversation

Xaymar
Copy link
Owner

@Xaymar Xaymar commented May 14, 2023

Explain the Pull Request

The old way was tedious and slow, as it relied on the preprocessor. We can instead (ab)use C++'s behavior with a special structure and function, which allows us to intelligently place loaders into the file that they actually came from - no more preprocessor needed!

Completion Checklist

  • This has been tested on the following platforms:
    • MacOS 10.15
    • MacOS 11
    • MacOS 12
    • Ubuntu 20.04
    • Ubuntu 22.04
    • Windows 10
    • Windows 11
  • The copyright headers and license files have been updated.
  • I will maintain this for the forseeable future, and have added myself to CODEOWNERS.

@Xaymar Xaymar force-pushed the patch/improved_initializer branch from d30a02d to 9d6cb68 Compare May 14, 2023 06:37
Xaymar added 21 commits May 14, 2023 08:43
This loader model should have wider compatibility, as it relies on defined C++ behavior instead of undefined preprocessor behavior. We may even be able to implement a simple dependency system that automatically sorts components into the correct order.
These most likely require dependencies to be migrated to the new system.
@Xaymar Xaymar force-pushed the patch/improved_initializer branch from 9d6cb68 to ef9d0a3 Compare May 14, 2023 07:02
@Xaymar Xaymar marked this pull request as ready for review May 14, 2023 07:12
@Xaymar Xaymar merged commit 7d1dc47 into root May 14, 2023
8 checks passed
@Xaymar Xaymar deleted the patch/improved_initializer branch May 14, 2023 07:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant