HarbourMasters / HarbourMasters/Shipwright
Convert `CVAR_*` methods to not use magic strings
Open
- Dominant language
- C
- Stars
- 5.4k
- Forks
- 837
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
Getting the key for a global variable, like the "Skip text" enhancement, is as easy as calling `CVAR_ENHANCEMENT("SkipText")`, but you have to spell `SkipText` correctly every time. Because it's an arbitrary string, failure to do so results in a bug at runtime instead of a build error.
The methods could be made more robust if they're reconfigured to take in constants instead of arbitrary strings (e.g. enum parameters that fetch associated string values from a dictionary).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.