mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 10:59: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:
@@ -12,8 +12,7 @@ bool vr_interface_factory::register_backend(const std::string &backend, vr_inter
|
||||
|
||||
std::unique_ptr<vr_interface> vr_interface_factory::create(const std::string &backend)
|
||||
{
|
||||
auto it = backends.find(backend);
|
||||
if (it != backends.end())
|
||||
if (auto it = backends.find(backend); it != backends.end())
|
||||
return it->second();
|
||||
|
||||
ErrorLog("vr backend \"" + backend + "\" not found!");
|
||||
|
||||
Reference in New Issue
Block a user