From 2c842afbf47dc79399005379447fc9df81d0b35d Mon Sep 17 00:00:00 2001 From: Erik Frojdh Date: Wed, 2 Feb 2022 19:27:44 +0100 Subject: [PATCH] removed M3 ops and fixed comment --- python/src/enums.cpp | 4 +--- slsSupportLib/include/sls/sls_detector_defs.h | 14 ++------------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/python/src/enums.cpp b/python/src/enums.cpp index e5627ac3b..68f9fdd97 100644 --- a/python/src/enums.cpp +++ b/python/src/enums.cpp @@ -281,9 +281,7 @@ void init_enums(py::module &m) { .value("M3_C50sh", slsDetectorDefs::M3_GainCaps::M3_C50sh) .value("M3_C225ACsh", slsDetectorDefs::M3_GainCaps::M3_C225ACsh) .value("M3_C15pre", slsDetectorDefs::M3_GainCaps::M3_C15pre) - .export_values() - .def(py::self | slsDetectorDefs::M3_GainCaps()) - .def(py::self & slsDetectorDefs::M3_GainCaps()); + .export_values(); py::enum_(Defs, "portPosition") .value("LEFT", slsDetectorDefs::portPosition::LEFT) diff --git a/slsSupportLib/include/sls/sls_detector_defs.h b/slsSupportLib/include/sls/sls_detector_defs.h index c36ee6b71..e92e6b0f5 100644 --- a/slsSupportLib/include/sls/sls_detector_defs.h +++ b/slsSupportLib/include/sls/sls_detector_defs.h @@ -563,6 +563,8 @@ enum streamingInterface { #ifdef __cplusplus }; + +//operators needed in ToString inline slsDetectorDefs::streamingInterface operator|(const slsDetectorDefs::streamingInterface &a, const slsDetectorDefs::streamingInterface &b) { @@ -577,19 +579,7 @@ operator&(const slsDetectorDefs::streamingInterface &a, static_cast(b)); }; -inline slsDetectorDefs::M3_GainCaps -operator|(const slsDetectorDefs::M3_GainCaps &a, - const slsDetectorDefs::M3_GainCaps &b) { - return slsDetectorDefs::M3_GainCaps(static_cast(a) | - static_cast(b)); -}; -inline slsDetectorDefs::M3_GainCaps -operator&(const slsDetectorDefs::M3_GainCaps &a, - const slsDetectorDefs::M3_GainCaps &b) { - return slsDetectorDefs::M3_GainCaps(static_cast(a) & - static_cast(b)); -}; #endif