mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 20:10:29 +01:00
refactor(sonar): make read-only global tables const (cpp:S5421)
Mutable global state (flags, timers, singletons) is left as is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -408,7 +408,7 @@ commanddescription_sequence Commands_descriptions = {
|
||||
};
|
||||
|
||||
// Maps of command and coresponding strings
|
||||
std::unordered_map<std::string, user_command> commandMap = {
|
||||
std::unordered_map<std::string, user_command> const commandMap = {
|
||||
{"aidriverdisable", user_command::aidriverdisable},
|
||||
{"jointcontrollerset", user_command::jointcontrollerset},
|
||||
{"mastercontrollerincrease", user_command::mastercontrollerincrease},
|
||||
|
||||
@@ -517,7 +517,7 @@ extern command_queue Commands;
|
||||
// TODO: add name to command map, and wrap these two into helper object
|
||||
extern commanddescription_sequence Commands_descriptions;
|
||||
|
||||
extern std::unordered_map<std::string, user_command> commandMap;
|
||||
extern std::unordered_map<std::string, user_command> const commandMap;
|
||||
}
|
||||
|
||||
// command_relay: composite class component, passes specified command to appropriate command stack
|
||||
|
||||
@@ -412,7 +412,7 @@ keyboard_input::poll() {
|
||||
m_movementvertical = movementvertical;
|
||||
}
|
||||
|
||||
std::unordered_map<int, std::string> keytonamemap = {
|
||||
std::unordered_map<int, std::string> const keytonamemap = {
|
||||
{ GLFW_KEY_0, "0" }, { GLFW_KEY_1, "1" }, { GLFW_KEY_2, "2" }, { GLFW_KEY_3, "3" }, { GLFW_KEY_4, "4" },
|
||||
{ GLFW_KEY_5, "5" }, { GLFW_KEY_6, "6" }, { GLFW_KEY_7, "7" }, { GLFW_KEY_8, "8" }, { GLFW_KEY_9, "9" },
|
||||
{ GLFW_KEY_MINUS, "-" }, { GLFW_KEY_EQUAL, "=" },
|
||||
|
||||
Reference in New Issue
Block a user