17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 10:59:20 +02:00

refactor(sonar): rename locals that shadow outer declarations (cpp:S1117)

Only local variables and definition parameters are renamed; shadowing
struct fields and enumerators in headers are left for a separate change.
This commit is contained in:
jerrrrycho
2026-10-10 16:45:39 +02:00
parent 846cb12430
commit e524d38128
17 changed files with 297 additions and 297 deletions

View File

@@ -355,19 +355,19 @@ drivermouse_input::button( int const Button, int const Action ) {
// if not release then it's press
m_pickwaiting = true;
GfxRenderer->Pick_Control_Callback(
[this, Button, Action, &mousecommand](TSubModel const *control, const glm::vec2 pos) {
[this, Button, Action, &mousecommand](TSubModel const *controlsubmodel, const glm::vec2 pos) {
bool pickwaiting = m_pickwaiting;
m_pickwaiting = false;
// click on python screen
if (Button == GLFW_MOUSE_BUTTON_LEFT
&& control && control->screen_touch_list) {
&& controlsubmodel && controlsubmodel->screen_touch_list) {
control->screen_touch_list->emplace_back(pos);
controlsubmodel->screen_touch_list->emplace_back(pos);
}
auto const [leftbinding, rightbinding]{ bindings( simulation::Train->GetLabel( control ) ) };
auto const [leftbinding, rightbinding]{ bindings( simulation::Train->GetLabel( controlsubmodel ) ) };
// if the recognized element under the cursor has a command associated with the pressed button, notify the recipient
mousecommand = Button == GLFW_MOUSE_BUTTON_LEFT ? leftbinding : rightbinding;