17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 22:39:19 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
jerrrrycho
ba6840b6ba refactor(sonar): assorted small fixes
- empty() instead of size() comparisons (cpp:S1155)
- member initialisers in declaration order (cpp:S3229)
- no redundant c_str() when a std::string is accepted (cpp:S7121)
- contains() on associative containers (cpp:S6171)
- const reference instead of a copying range-for (cpp:S6032)
- starts_with() for prefix checks (cpp:S6178)
- no std::move on temporaries (cpp:S5274)
- has_value() on std::optional (cpp:S7172)
- bool literals for bool members (cpp:S5820)
- inline only on the definition (cpp:S3548)
- explicit base access specifier (cpp:S5965)
- explicit element access instead of dereferencing an array (cpp:S7116)
- rely on the C++20 rewritten operator!= (cpp:S6186)
2026-10-10 20:44:56 +02:00
jerrrrycho
f6736fa233 refactor(sonar): pass expensive-to-copy parameters by const reference (cpp:S1238)
Signatures declared in files touched by PR 206 (Driver.h, EU07.cpp) and
virtual overrides are left unchanged.
2026-10-10 20:44:51 +02:00
jerrrrycho
4532d5e037 refactor(sonar): take read-only pointer and reference parameters as const (cpp:S995)
TTrain command handlers keep their signature, it is fixed by the handler table.
2026-10-10 20:44:51 +02:00
jerrrrycho
693a817d5e refactor(sonar): make read-only local references and pointers const (cpp:S5350) 2026-10-10 20:44:50 +02:00
jerrrrycho
34c0c8182d refactor(sonar): reduce enum qualification with using enum (cpp:S6177)
Applied only where no unqualified name in the block could be captured by
the introduced enumerators.
2026-10-10 20:44:49 +02:00
jerrrrycho
560512bd9e refactor(sonar): use structured bindings for pair access (cpp:S6005) 2026-10-10 20:44:42 +02:00
jerrrrycho
f8c6e358bd refactor(sonar): use try_emplace for map insertion (cpp:S6030) 2026-10-10 20:44:39 +02:00
jerrrrycho
6fce71af36 refactor(sonar): scope single-use variables in if init-statements (cpp:S6004) 2026-10-10 20:44:38 +02:00
jerrrrycho
0d886e65ec refactor(sonar): merge collapsible nested if statements (cpp:S1066)
Comments that preceded the inner if are kept above the merged statement.
2026-10-10 20:44:37 +02:00
jerrrrycho
8042953b95 refactor(sonar): declare non-mutating member functions const (cpp:S5817)
Virtual functions are left untouched so overrides keep matching.
2026-10-10 20:44:37 +02:00
jerrrrycho
ad32f1f840 refactor(sonar): make narrowing conversions explicit (cpp:S5276) 2026-10-10 20:44:35 +02:00
jerrrrycho
c4738dbc87 refactor(sonar): remove empty statements, one declaration per statement (cpp:S1116, cpp:S1659) 2026-10-10 20:44:31 +02:00
d60841944d Merge pull request #124 from xwizard/refactor/user-config-path
refactor: extract user_config_path() helper
2026-06-30 22:35:53 +02:00
Mateusz Włodarczyk
fe603f15eb refactor: extract user_config_path() helper
Consolidates platform-specific config-directory logic (APPDATA on Windows,
~/Library/Application Support on macOS, ~/.config on Linux) into a single
user_config_path(filename) function in utilities/utilities.{cpp,h}, removing
copy-pasted #ifdef blocks from application.cpp, editor/editorSettings.cpp,
input/{keyboard,gamepad,drivermouse,uart}input.cpp.
2026-06-30 21:30:36 +02:00
jerrrrycho
d85096f64d reformat: remove redundant parentheses 2026-06-30 21:19:46 +02:00
docentYT
3628eb0fc3 Replace interpolate with std::lerp and glm::mix 2026-05-02 01:31:38 +02:00
copilot-swe-agent[bot]
7e49aa8740 Rewrite #includes to use explicit subdirectory paths
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:16:48 +00:00
copilot-swe-agent[bot]
0531086bb9 Reorganize source files into logical subdirectories
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
2026-03-14 19:01:57 +00:00