From a56b2215592bdcaf2c14466d76119e926e2bcc0c Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 7 Aug 2018 19:33:13 +0300 Subject: [PATCH] core: cv::Range() ostream write operator remove from DNN module headers --- modules/core/include/opencv2/core/cvstd.inl.hpp | 5 +++++ modules/dnn/include/opencv2/dnn/shape_utils.hpp | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/modules/core/include/opencv2/core/cvstd.inl.hpp b/modules/core/include/opencv2/core/cvstd.inl.hpp index 631fe94e1a..ed37cacb30 100644 --- a/modules/core/include/opencv2/core/cvstd.inl.hpp +++ b/modules/core/include/opencv2/core/cvstd.inl.hpp @@ -269,6 +269,11 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize return out; } +static inline std::ostream &operator<< (std::ostream &s, cv::Range &r) +{ + return s << "[" << r.start << " : " << r.end << ")"; +} + } // cv #ifdef _MSC_VER diff --git a/modules/dnn/include/opencv2/dnn/shape_utils.hpp b/modules/dnn/include/opencv2/dnn/shape_utils.hpp index 953a437dc2..64811d8184 100644 --- a/modules/dnn/include/opencv2/dnn/shape_utils.hpp +++ b/modules/dnn/include/opencv2/dnn/shape_utils.hpp @@ -42,8 +42,8 @@ #ifndef OPENCV_DNN_DNN_SHAPE_UTILS_HPP #define OPENCV_DNN_DNN_SHAPE_UTILS_HPP -#include -#include +#include +#include // CV_MAX_DIM #include #include #include @@ -52,12 +52,6 @@ namespace cv { namespace dnn { CV__DNN_EXPERIMENTAL_NS_BEGIN -//Useful shortcut -inline std::ostream &operator<< (std::ostream &s, cv::Range &r) -{ - return s << "[" << r.start << ", " << r.end << ")"; -} - //Slicing struct _Range : public cv::Range