style: add braces around single-statement bodies

- wrap single-statement control-flow bodies in braces
- clang-tidy readability-braces-around-statements
  https://clang.llvm.org/extra/clang-tidy/checks/readability/braces-around-statements.html
This commit is contained in:
Dennis Klein
2026-06-09 19:58:45 +02:00
committed by Dennis Klein
parent e23c4d8ff1
commit 7a44c5e19e
2 changed files with 9 additions and 3 deletions

View File

@@ -17,7 +17,9 @@ auto PluginServices::ChangeDeviceState(const string& controller, const DeviceSta
{
lock_guard<mutex> lock{fDeviceControllerMutex};
if (!fDeviceController) fDeviceController = controller;
if (!fDeviceController) {
fDeviceController = controller;
}
if (fDeviceController == controller) {
return fDevice.ChangeState(next);