modules: add type strictness to cat/subcat types
with cats and subcats both being plain integers it's very easy to make a mistake mixing them up, storing one in a variable for another, or passing the wrong variable to the wrong function. switching to enums adds type strictness to help catch such mistakes. in switching to enums there is of course additional opportunity to exploit sequential numbering to achieve certain optimisations that can be gained from this, but that it not done here. here we're simply interested in catching mistakes through type strictness. note that we simply retain the same cat/subcat numbering as before here.
Showing
- include/vlc_config_cat.h 15 additions, 15 deletionsinclude/vlc_config_cat.h
- include/vlc_plugin.h 68 additions, 57 deletionsinclude/vlc_plugin.h
- modules/gui/macosx/preferences/prefs.m 22 additions, 22 deletionsmodules/gui/macosx/preferences/prefs.m
- modules/gui/qt/dialogs/preferences/complete_preferences.cpp 13 additions, 13 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.cpp
- modules/gui/qt/dialogs/preferences/complete_preferences.hpp 6 additions, 6 deletionsmodules/gui/qt/dialogs/preferences/complete_preferences.hpp
Loading
Please register or sign in to comment