The Wayback Machine - https://web.archive.org/web/20201030091727/https://github.com/lethal-guitar/RigelEngine/issues/472
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

Move state structs into behavior classes #472

Open
lethal-guitar opened this issue Jan 1, 2020 · 0 comments
Open

Move state structs into behavior classes #472

lethal-guitar opened this issue Jan 1, 2020 · 0 comments

Comments

@lethal-guitar
Copy link
Owner

@lethal-guitar lethal-guitar commented Jan 1, 2020

Many behavior classes are using a std::variant to model their state machine, with a couple of structs representing the possible states. See lava_fountain.hpp for an example of this pattern.

Due to a bug in older versions of GCC, it was necessary to declare these structs outside of the class, like in smash_hammer.hpp for example.

This workaround is not necessary anymore, as the project requires a more recent GCC now. The following behaviors can now be cleaned up by moving the struct declarations into the behavior class and eliminating the namespace enclosing the structs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.