Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Convert vmSymbols::SID to enum class to provide better type safety. Also implement proper enumerators for this type of enums to avoid code like this (which might get out of bounds if you're not careful): for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) { vm_symbol_index[index] = (SID)index; } The new iteration style is: for (vmSymbolID index : vmSymbolsIterator()) { vm_symbol_index[as_int(index)] = index; } Also, implement type-safe casting from ints to SIDs, and vice versa.
|