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

refactor(sonar): scope single-use variables in if init-statements (cpp:S6004)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 15:44:18 +02:00
parent f8104bd0dd
commit 9b89a5d887
27 changed files with 78 additions and 175 deletions

View File

@@ -193,8 +193,7 @@ uart_input::recall_bindings() {
m_inputbindings.clear();
std::string filePath = "eu07_input-uart.ini";
fs::path appPath = user_config_path("eu07_input-uart.ini");
if (!appPath.empty() && fs::exists(appPath))
if (fs::path appPath = user_config_path("eu07_input-uart.ini"); !appPath.empty() && fs::exists(appPath))
filePath = appPath.string();
cParser bindingparser(filePath.c_str(), cParser::buffer_FILE);
if (false == bindingparser.ok())