diff --git a/application/driverhints.h b/application/driverhints.h index 7b6130c2..140fe5f9 100644 --- a/application/driverhints.h +++ b/application/driverhints.h @@ -12,7 +12,7 @@ enum class driver_hint { #ifdef DRIVER_HINT_CONTENT #define DRIVER_HINT_DEF(a, b) b, -const char *driver_hints_texts[] = +const char *const driver_hints_texts[] = { #include "application/driverhints_def.h" }; diff --git a/input/command.cpp b/input/command.cpp index ca519a90..d7966f37 100644 --- a/input/command.cpp +++ b/input/command.cpp @@ -408,7 +408,7 @@ commanddescription_sequence Commands_descriptions = { }; // Maps of command and coresponding strings -std::unordered_map commandMap = { +std::unordered_map const commandMap = { {"aidriverdisable", user_command::aidriverdisable}, {"jointcontrollerset", user_command::jointcontrollerset}, {"mastercontrollerincrease", user_command::mastercontrollerincrease}, diff --git a/input/command.h b/input/command.h index 226813d8..e03622a9 100644 --- a/input/command.h +++ b/input/command.h @@ -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 commandMap; +extern std::unordered_map const commandMap; } // command_relay: composite class component, passes specified command to appropriate command stack diff --git a/input/keyboardinput.cpp b/input/keyboardinput.cpp index 0d9845b2..b0188573 100644 --- a/input/keyboardinput.cpp +++ b/input/keyboardinput.cpp @@ -412,7 +412,7 @@ keyboard_input::poll() { m_movementvertical = movementvertical; } -std::unordered_map keytonamemap = { +std::unordered_map 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, "=" }, diff --git a/utilities/Logs.cpp b/utilities/Logs.cpp index 005e7f8e..d3d447a1 100644 --- a/utilities/Logs.cpp +++ b/utilities/Logs.cpp @@ -21,7 +21,7 @@ std::ofstream errors; // lista błędów "errors.txt", zawsze działa std::ofstream comms; // lista komunikatow "comms.txt", można go wyłączyć char logbuffer[ 256 ]; -char endstring[10] = "\n"; +char const endstring[10] = "\n"; std::deque log_scrollback; diff --git a/utilities/uart.cpp b/utilities/uart.cpp index aa441491..4ffedf18 100644 --- a/utilities/uart.cpp +++ b/utilities/uart.cpp @@ -10,7 +10,7 @@ #include "simulation/simulationtime.h" #include "application/application.h" -const char* uart_baudrates_list[] = { +const char* const uart_baudrates_list[] = { "300", "1200", "2400", diff --git a/utilities/uart.h b/utilities/uart.h index 1a0f344b..cee227d1 100644 --- a/utilities/uart.h +++ b/utilities/uart.h @@ -3,7 +3,7 @@ #include #include "input/command.h" -extern const char* uart_baudrates_list[]; +extern const char* const uart_baudrates_list[]; extern const size_t uart_baudrates_list_num; class uart_status { diff --git a/utilities/utilities.cpp b/utilities/utilities.cpp index 5e4083b1..68725738 100644 --- a/utilities/utilities.cpp +++ b/utilities/utilities.cpp @@ -421,7 +421,7 @@ void win1250_to_utf32(std::string const &Text, std::u32string &Output) } // Ra: tymczasowe rozwiązanie kwestii zagranicznych (czeskich) napisów -char charsetconversiontable[] = "E?,?\"_++?%Sstzz" +char const charsetconversiontable[] = "E?,?\"_++?%Sstzz" " ^^L$A|S^CS<--RZo±,l'uP.,as>L\"lz" "RAAAALCCCEEEEIIDDNNOOOOxRUUUUYTB" "raaaalccceeeeiiddnnoooo-ruuuuyt?"; diff --git a/world/mtable.h b/world/mtable.h index 3a965b44..44cda731 100644 --- a/world/mtable.h +++ b/world/mtable.h @@ -18,7 +18,7 @@ namespace Mtable { static int const MaxTTableSize = 100; // można by to robić dynamicznie -static char const *hrsd = "."; +static char const *const hrsd = "."; // Ra: pozycja zerowa rozkładu chyba nie ma sensu // Ra: numeracja przystanków jest 1..StationCount