Prevent keyboard modifiers from leaking
- Instead of carelessly allocating
Modifier
objects on the heap and forgetting about them, turn the list of all modifiers into their owner. - Replace all static maps with static local variables of helper functions to partially guard against the static initialization fiasco.
- Improve const correctness of the
Modifier
class - Small improvements in the code.
With this fix, 2 more unit tests now pass on a sanitized build.
Not addressed: the ugly design with a global state tweaked by the Shortcuts system.
Edited by Rafał Siejakowski