mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-06-15 08:17:05 +00:00
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:
committed by
Dennis Klein
parent
e23c4d8ff1
commit
7a44c5e19e
@@ -17,7 +17,9 @@ auto PluginServices::ChangeDeviceState(const string& controller, const DeviceSta
|
|||||||
{
|
{
|
||||||
lock_guard<mutex> lock{fDeviceControllerMutex};
|
lock_guard<mutex> lock{fDeviceControllerMutex};
|
||||||
|
|
||||||
if (!fDeviceController) fDeviceController = controller;
|
if (!fDeviceController) {
|
||||||
|
fDeviceController = controller;
|
||||||
|
}
|
||||||
|
|
||||||
if (fDeviceController == controller) {
|
if (fDeviceController == controller) {
|
||||||
return fDevice.ChangeState(next);
|
return fDevice.ChangeState(next);
|
||||||
|
|||||||
@@ -29,13 +29,17 @@ TEST(EventManager, Basics)
|
|||||||
std::function<void(typename TestEvent::KeyType, int)> callback{
|
std::function<void(typename TestEvent::KeyType, int)> callback{
|
||||||
[&](TestEvent::KeyType key, int newValue){
|
[&](TestEvent::KeyType key, int newValue){
|
||||||
++call_counter;
|
++call_counter;
|
||||||
if (key == "test") value = newValue;
|
if (key == "test") {
|
||||||
|
value = newValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
std::function<void(typename TestEvent::KeyType, string)> callback2{
|
std::function<void(typename TestEvent::KeyType, string)> callback2{
|
||||||
[&](TestEvent::KeyType key, string newValue){
|
[&](TestEvent::KeyType key, string newValue){
|
||||||
++call_counter2;
|
++call_counter2;
|
||||||
if (key == "test") value2 = newValue;
|
if (key == "test") {
|
||||||
|
value2 = newValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user