Skip to content

Comments

CombatEvents: Convert namespace constants to enum class#4

Open
HamsterSerious wants to merge 3 commits intoapoguita:mainfrom
HamsterSerious:main
Open

CombatEvents: Convert namespace constants to enum class#4
HamsterSerious wants to merge 3 commits intoapoguita:mainfrom
HamsterSerious:main

Conversation

@HamsterSerious
Copy link
Contributor

Converted CombatEventTypes namespace with constexpr constants to a proper enum class CombatEventType : uint32_t for type safety
Added to_uint() helper function for easy conversion back to uint32_t
Added backwards-compatible CombatEventTypes namespace in the .cpp file with constexpr aliases mapping to the new enum values, so existing code using CombatEventTypes::FOO continues to work

Important Note
I haven't had time to work on this for the past week and upstream has had changes in the meantime. I've rebased on top of the latest upstream, but it would be appreciated if you could double-check that nothing was broken in the process.

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.

1 participant