format + exception.cpp

This commit is contained in:
Erik Frojdh
2020-05-13 14:48:52 +02:00
parent f0f97f265a
commit 3962714b48
14 changed files with 63 additions and 39 deletions

View File

@ -2,13 +2,13 @@
namespace sls {
std::string ToString(const slsDetectorDefs::ROI& roi){
std::string ToString(const slsDetectorDefs::ROI &roi) {
std::ostringstream oss;
oss << '[' << roi.xmin << ", " << roi.xmax << ']';
return oss.str();
}
std::ostream&operator<<(std::ostream &os, const slsDetectorDefs::ROI& roi){
std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::ROI &roi) {
return os << ToString(roi);
}