C++11: Use sized enums (+4% performance).

This commit is contained in:
Wilson Snyder
2020-08-16 12:05:35 -04:00
parent ee9d6dd63f
commit 78aee6f4e7
32 changed files with 93 additions and 70 deletions
+3 -3
View File
@@ -53,7 +53,7 @@ class OrderMoveDomScope;
//######################################################################
enum OrderWeights {
enum OrderWeights : uint8_t {
WEIGHT_INPUT = 1, // Low weight just so dot graph looks nice
WEIGHT_COMBO = 1, // Breakable combo logic
WEIGHT_POST = 2, // Post-delayed used var
@@ -63,7 +63,7 @@ enum OrderWeights {
}; // High weight just so dot graph looks nice
struct OrderVEdgeType {
enum en {
enum en : uint8_t {
VERTEX_UNKNOWN = 0,
VERTEX_INPUTS,
VERTEX_LOGIC,
@@ -322,7 +322,7 @@ public:
//--- Following only under the move graph, not the main graph
class OrderMoveVertex : public V3GraphVertex {
typedef enum { POM_WAIT, POM_READY, POM_MOVED } OrderMState;
typedef enum : uint8_t { POM_WAIT, POM_READY, POM_MOVED } OrderMState;
OrderLogicVertex* m_logicp;
OrderMState m_state; // Movement state