From 2fe06c7163893dec0326d2dda2cf07cffb4d0ec7 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Tue, 13 Aug 2019 11:19:25 +0200 Subject: [PATCH] WIP --- slsDetectorSoftware/include/Result.h | 10 ---------- slsDetectorSoftware/src/Detector.cpp | 5 +++-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/slsDetectorSoftware/include/Result.h b/slsDetectorSoftware/include/Result.h index 92a96aaaf..08386677c 100644 --- a/slsDetectorSoftware/include/Result.h +++ b/slsDetectorSoftware/include/Result.h @@ -97,16 +97,6 @@ template > class Result { vec.push_back(std::forward(value)); } - /** Disable emplace_back if the underlying vector does not support it - * vector gcc 4.8 - */ - template - auto emplace_back(Args &&... args) -> - typename std::enable_if>::value, - decltype(vec.emplace_back(args...))>::type { - return vec.emplace_back(std::forward(args)...); - } - auto operator[](size_type pos) -> decltype(vec[pos]) { return vec[pos]; } const_reference operator[](size_type pos) const { return vec[pos]; } diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index 7a34f4621..81dc9792a 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -1072,7 +1072,7 @@ void Detector::setCounterBit(bool value, Positions pos) { } Result> Detector::getROI(Positions pos) const { - //vector holding module_id for the modules that should be read + //vector holding module_id for the modules that should be read const std::vector id_vec = [&]() { if (pos.empty() || (pos.size() == 1 && pos[0] == -1)){ std::vector tmp; @@ -1084,6 +1084,7 @@ Result> Detector::getROI(Positions pos) const { } }(); + //values to return Result> res; @@ -1091,7 +1092,7 @@ Result> Detector::getROI(Positions pos) const { for (const auto& i :id_vec){ int n = 0; auto ptr = pimpl->getROI(n, i); - res.emplace_back(ptr, ptr+n); + // res.emplace_back(ptr, ptr+n); } return res; }