From 91140bbb711abd3c6d2d5c80b30f27b5438bac0a Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 24 Oct 2023 11:17:18 +0200 Subject: [PATCH] formatting --- slsDetectorSoftware/src/Detector.cpp | 3 ++- .../tests/test-CmdProxy-gotthard2.cpp | 3 ++- slsDetectorSoftware/tests/test-Result.cpp | 18 +++++++++--------- slsSupportLib/include/sls/TypeTraits.h | 13 ++++++------- slsSupportLib/include/sls/versionAPI.h | 2 +- 5 files changed, 20 insertions(+), 19 deletions(-) diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index b813f80e9..f04989b98 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -861,7 +861,8 @@ void Detector::stopDetector(Positions pos) { // idle before stopping will return running (after async start script) when // getting status after, which will then be stopped again. - while (!status.contains_only(defs::runStatus::IDLE, defs::runStatus::STOPPED)){ + while (!status.contains_only(defs::runStatus::IDLE, + defs::runStatus::STOPPED)) { if (status.any(defs::runStatus::ERROR)) { throw RuntimeError("Could not stop detector. At least one module " "returned error status."); diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp index ccc5c9410..4cc88d954 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp @@ -692,7 +692,8 @@ TEST_CASE("confadc", "[.cmd]") { const int ndet = det.size(); const int nchip = 10; const int nadc = 32; - std::vector>> prev_val(ndet, std::vector>(nchip, std::vector(nadc))); + std::vector>> prev_val( + ndet, std::vector>(nchip, std::vector(nadc))); for (int i = 0; i != ndet; ++i) { for (int j = 0; j != nchip; ++j) { for (int k = 0; k != nadc; ++k) { diff --git a/slsDetectorSoftware/tests/test-Result.cpp b/slsDetectorSoftware/tests/test-Result.cpp index 30a735f28..c921dcfb1 100644 --- a/slsDetectorSoftware/tests/test-Result.cpp +++ b/slsDetectorSoftware/tests/test-Result.cpp @@ -196,24 +196,24 @@ TEST_CASE("String conversions") { "[{one: 1}, {one: 1, three: 3, two: 2}, {one: 1}]"); } -TEST_CASE("Any element is equal"){ - Result r{1,2,3,4,5}; +TEST_CASE("Any element is equal") { + Result r{1, 2, 3, 4, 5}; REQUIRE(r.any(3)); REQUIRE_FALSE(r.any(9)); } -TEST_CASE("Result contains only the specified elements"){ - Result r{1,1,1}; +TEST_CASE("Result contains only the specified elements") { + Result r{1, 1, 1}; REQUIRE(r.contains_only(1)); - REQUIRE(r.contains_only(1,1)); + REQUIRE(r.contains_only(1, 1)); } -TEST_CASE("Only with multiple values"){ - Result r{1,1,2,1,2,1,1}; +TEST_CASE("Only with multiple values") { + Result r{1, 1, 2, 1, 2, 1, 1}; REQUIRE_FALSE(r.contains_only(1)); REQUIRE_FALSE(r.contains_only(2)); - REQUIRE(r.contains_only(1,2)); - REQUIRE(r.contains_only(2,1)); + REQUIRE(r.contains_only(1, 2)); + REQUIRE(r.contains_only(2, 1)); } } // namespace sls diff --git a/slsSupportLib/include/sls/TypeTraits.h b/slsSupportLib/include/sls/TypeTraits.h index 80bee0b44..042d5d58e 100644 --- a/slsSupportLib/include/sls/TypeTraits.h +++ b/slsSupportLib/include/sls/TypeTraits.h @@ -103,14 +103,13 @@ template struct is_vector : public std::false_type {}; template struct is_vector> : public std::true_type {}; - - -template struct Conjunction : std::true_type {}; -template struct Conjunction : B1 {}; -template +template struct Conjunction : std::true_type {}; +template struct Conjunction : B1 {}; +template struct Conjunction : std::conditional, B1>::type {}; -template -using AllSame = typename std::enable_if...>::value>::type; +template +using AllSame = + typename std::enable_if...>::value>::type; } // namespace sls \ No newline at end of file diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index 9906d6204..54c700f8d 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -10,4 +10,4 @@ #define APIJUNGFRAU "7.0.3 0x230922" #define APIMYTHEN3 "7.0.3 0x230922" #define APIMOENCH "7.0.3 0x230922" -#define APIEIGER "7.0.3 0x231018" +#define APIEIGER "7.0.3 0x231018"