Codechange: Replace mishmash of types for widget index with WidgetID.
Indices were stored as int, but often passed around as uint/uint8_t and casts. Now they should all use WidgetID.
This commit is contained in:

committed by
Peter Nelson

parent
fd84f73323
commit
a0dfb76e34
@@ -10,6 +10,13 @@
|
||||
#ifndef WINDOW_TYPE_H
|
||||
#define WINDOW_TYPE_H
|
||||
|
||||
/**
|
||||
* Widget ID.
|
||||
* Even though the ID is signed, actual IDs must be non-negative.
|
||||
* Negative IDs are used for special cases, like denoting 'no widget'.
|
||||
*/
|
||||
using WidgetID = int;
|
||||
|
||||
/** %Window numbers. */
|
||||
enum WindowNumberEnum {
|
||||
WN_GAME_OPTIONS_AI = 0, ///< AI settings.
|
||||
|
Reference in New Issue
Block a user