Inline static variables (part 1)

This commit is contained in:
kobewi
2025-04-28 20:27:50 +02:00
parent 67c96c89cc
commit 5af4bef46f
52 changed files with 85 additions and 247 deletions

View File

@ -45,7 +45,7 @@ public:
/**
* A special value used to signify that a given Action can be triggered by any device
*/
static int ALL_DEVICES;
static constexpr int ALL_DEVICES = -1;
struct Action {
int id;
@ -58,7 +58,7 @@ public:
static constexpr float DEFAULT_TOGGLE_DEADZONE = 0.5f;
private:
static InputMap *singleton;
static inline InputMap *singleton = nullptr;
mutable HashMap<StringName, Action> input_map;
HashMap<String, List<Ref<InputEvent>>> default_builtin_cache;