[opencv] 15/251: Get rid of OPENCV_NOSTL definition
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 3.3.0
in repository opencv.
commit 2a2a1dc5b4a42cd05c76662f8fa1f866d82ffa89
Author: Vladislav Sovrasov <sovrasov.vlad at gmail.com>
Date: Fri May 19 16:51:08 2017 +0300
Get rid of OPENCV_NOSTL definition
---
modules/core/include/opencv2/core/cvstd.hpp | 33 +----------------------
modules/core/include/opencv2/core/cvstd.inl.hpp | 8 ++----
modules/core/include/opencv2/core/mat.hpp | 10 -------
modules/core/include/opencv2/core/persistence.hpp | 2 --
modules/core/include/opencv2/core/utility.hpp | 2 --
modules/photo/src/denoise_tvl1.cpp | 15 +----------
6 files changed, 4 insertions(+), 66 deletions(-)
diff --git a/modules/core/include/opencv2/core/cvstd.hpp b/modules/core/include/opencv2/core/cvstd.hpp
index 83d5cdb..ddb53e5 100644
--- a/modules/core/include/opencv2/core/cvstd.hpp
+++ b/modules/core/include/opencv2/core/cvstd.hpp
@@ -53,12 +53,9 @@
#include <cstring>
#include <cctype>
-#ifndef OPENCV_NOSTL
-# include <string>
-#endif
+#include <string>
// import useful primitives from stl
-#ifndef OPENCV_NOSTL_TRANSITIONAL
# include <algorithm>
# include <utility>
# include <cstdlib> //for abs(int)
@@ -81,21 +78,6 @@ namespace cv
using std::log;
}
-#else
-namespace cv
-{
- template<typename T> static inline T min(T a, T b) { return a < b ? a : b; }
- template<typename T> static inline T max(T a, T b) { return a > b ? a : b; }
- template<typename T> static inline T abs(T a) { return a < 0 ? -a : a; }
- template<typename T> static inline void swap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
-
- template<> inline uchar abs(uchar a) { return a; }
- template<> inline ushort abs(ushort a) { return a; }
- template<> inline unsigned abs(unsigned a) { return a; }
- template<> inline uint64 abs(uint64 a) { return a; }
-}
-#endif
-
namespace cv {
//! @addtogroup core_utils
@@ -555,7 +537,6 @@ public:
String toLowerCase() const;
-#ifndef OPENCV_NOSTL
String(const std::string& str);
String(const std::string& str, size_t pos, size_t len = npos);
String& operator=(const std::string& str);
@@ -564,7 +545,6 @@ public:
friend String operator+ (const String& lhs, const std::string& rhs);
friend String operator+ (const std::string& lhs, const String& rhs);
-#endif
private:
char* cstr_;
@@ -1049,21 +1029,10 @@ static inline bool operator>= (const String& lhs, const char* rhs) { return lh
} // cv
-#ifndef OPENCV_NOSTL_TRANSITIONAL
namespace std
{
static inline void swap(cv::String& a, cv::String& b) { a.swap(b); }
}
-#else
-namespace cv
-{
- template<> inline
- void swap<cv::String>(cv::String& a, cv::String& b)
- {
- a.swap(b);
- }
-}
-#endif
#include "opencv2/core/ptr.inl.hpp"
diff --git a/modules/core/include/opencv2/core/cvstd.inl.hpp b/modules/core/include/opencv2/core/cvstd.inl.hpp
index c8c7ba9..dd9ba31 100644
--- a/modules/core/include/opencv2/core/cvstd.inl.hpp
+++ b/modules/core/include/opencv2/core/cvstd.inl.hpp
@@ -44,10 +44,8 @@
#ifndef OPENCV_CORE_CVSTDINL_HPP
#define OPENCV_CORE_CVSTDINL_HPP
-#ifndef OPENCV_NOSTL
-# include <complex>
-# include <ostream>
-#endif
+#include <complex>
+#include <ostream>
//! @cond IGNORED
@@ -58,7 +56,6 @@
namespace cv
{
-#ifndef OPENCV_NOSTL
template<typename _Tp> class DataType< std::complex<_Tp> >
{
@@ -280,7 +277,6 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize
return out;
}
-#endif // OPENCV_NOSTL
} // cv
#ifdef _MSC_VER
diff --git a/modules/core/include/opencv2/core/mat.hpp b/modules/core/include/opencv2/core/mat.hpp
index 92d34c1..afdbec5 100644
--- a/modules/core/include/opencv2/core/mat.hpp
+++ b/modules/core/include/opencv2/core/mat.hpp
@@ -2967,9 +2967,7 @@ public:
typedef const uchar** pointer;
typedef uchar* reference;
-#ifndef OPENCV_NOSTL
typedef std::random_access_iterator_tag iterator_category;
-#endif
//! default constructor
MatConstIterator();
@@ -3034,9 +3032,7 @@ public:
typedef const _Tp* pointer;
typedef const _Tp& reference;
-#ifndef OPENCV_NOSTL
typedef std::random_access_iterator_tag iterator_category;
-#endif
//! default constructor
MatConstIterator_();
@@ -3087,9 +3083,7 @@ public:
typedef _Tp* pointer;
typedef _Tp& reference;
-#ifndef OPENCV_NOSTL
typedef std::random_access_iterator_tag iterator_category;
-#endif
//! the default constructor
MatIterator_();
@@ -3223,9 +3217,7 @@ template<typename _Tp> class SparseMatConstIterator_ : public SparseMatConstIter
{
public:
-#ifndef OPENCV_NOSTL
typedef std::forward_iterator_tag iterator_category;
-#endif
//! the default constructor
SparseMatConstIterator_();
@@ -3259,9 +3251,7 @@ template<typename _Tp> class SparseMatIterator_ : public SparseMatConstIterator_
{
public:
-#ifndef OPENCV_NOSTL
typedef std::forward_iterator_tag iterator_category;
-#endif
//! the default constructor
SparseMatIterator_();
diff --git a/modules/core/include/opencv2/core/persistence.hpp b/modules/core/include/opencv2/core/persistence.hpp
index 90da60d..a5ae22f 100644
--- a/modules/core/include/opencv2/core/persistence.hpp
+++ b/modules/core/include/opencv2/core/persistence.hpp
@@ -570,9 +570,7 @@ public:
operator double() const;
//! returns the node content as text string
operator String() const;
-#ifndef OPENCV_NOSTL
operator std::string() const;
-#endif
//! returns pointer to the underlying file node
CvFileNode* operator *();
diff --git a/modules/core/include/opencv2/core/utility.hpp b/modules/core/include/opencv2/core/utility.hpp
index cdff24d..a7a3eb9 100644
--- a/modules/core/include/opencv2/core/utility.hpp
+++ b/modules/core/include/opencv2/core/utility.hpp
@@ -1022,7 +1022,6 @@ template<typename _Tp, size_t fixed_size> inline
AutoBuffer<_Tp, fixed_size>::operator const _Tp* () const
{ return ptr; }
-#ifndef OPENCV_NOSTL
template<> inline std::string CommandLineParser::get<std::string>(int index, bool space_delete) const
{
return get<String>(index, space_delete);
@@ -1031,7 +1030,6 @@ template<> inline std::string CommandLineParser::get<std::string>(const String&
{
return get<String>(name, space_delete);
}
-#endif // OPENCV_NOSTL
//! @endcond
diff --git a/modules/photo/src/denoise_tvl1.cpp b/modules/photo/src/denoise_tvl1.cpp
index 03bd747..df756c4 100644
--- a/modules/photo/src/denoise_tvl1.cpp
+++ b/modules/photo/src/denoise_tvl1.cpp
@@ -56,21 +56,8 @@ namespace cv{
double _scale;
};
-#ifndef OPENCV_NOSTL
using std::transform;
-#else
- template <class InputIterator, class InputIterator2, class OutputIterator, class BinaryOperator>
- static OutputIterator transform (InputIterator first1, InputIterator last1, InputIterator2 first2,
- OutputIterator result, BinaryOperator binary_op)
- {
- while (first1 != last1)
- {
- *result = binary_op(*first1, *first2);
- ++result; ++first1; ++first2;
- }
- return result;
- }
-#endif
+
void denoise_TVL1(const std::vector<Mat>& observations,Mat& result, double lambda, int niters){
CV_Assert(observations.size()>0 && niters>0 && lambda>0);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list