Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
928bfe0b
Commit
928bfe0b
authored
Jul 14, 2017
by
Alexander Alekhin
Committed by
GitHub
Jul 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9088 from sovrasov:no_nostl
core: get rid of OPENCV_NOSTL definition
parents
86e8a105
2a2a1dc5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
66 deletions
+4
-66
cvstd.hpp
modules/core/include/opencv2/core/cvstd.hpp
+1
-32
cvstd.inl.hpp
modules/core/include/opencv2/core/cvstd.inl.hpp
+2
-6
mat.hpp
modules/core/include/opencv2/core/mat.hpp
+0
-10
persistence.hpp
modules/core/include/opencv2/core/persistence.hpp
+0
-2
utility.hpp
modules/core/include/opencv2/core/utility.hpp
+0
-2
denoise_tvl1.cpp
modules/photo/src/denoise_tvl1.cpp
+1
-14
No files found.
modules/core/include/opencv2/core/cvstd.hpp
View file @
928bfe0b
...
@@ -53,12 +53,9 @@
...
@@ -53,12 +53,9 @@
#include <cstring>
#include <cstring>
#include <cctype>
#include <cctype>
#ifndef OPENCV_NOSTL
#include <string>
# include <string>
#endif
// import useful primitives from stl
// import useful primitives from stl
#ifndef OPENCV_NOSTL_TRANSITIONAL
# include <algorithm>
# include <algorithm>
# include <utility>
# include <utility>
# include <cstdlib> //for abs(int)
# include <cstdlib> //for abs(int)
...
@@ -81,21 +78,6 @@ namespace cv
...
@@ -81,21 +78,6 @@ namespace cv
using
std
::
log
;
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
{
namespace
cv
{
//! @addtogroup core_utils
//! @addtogroup core_utils
...
@@ -555,7 +537,6 @@ public:
...
@@ -555,7 +537,6 @@ public:
String
toLowerCase
()
const
;
String
toLowerCase
()
const
;
#ifndef OPENCV_NOSTL
String
(
const
std
::
string
&
str
);
String
(
const
std
::
string
&
str
);
String
(
const
std
::
string
&
str
,
size_t
pos
,
size_t
len
=
npos
);
String
(
const
std
::
string
&
str
,
size_t
pos
,
size_t
len
=
npos
);
String
&
operator
=
(
const
std
::
string
&
str
);
String
&
operator
=
(
const
std
::
string
&
str
);
...
@@ -564,7 +545,6 @@ public:
...
@@ -564,7 +545,6 @@ public:
friend
String
operator
+
(
const
String
&
lhs
,
const
std
::
string
&
rhs
);
friend
String
operator
+
(
const
String
&
lhs
,
const
std
::
string
&
rhs
);
friend
String
operator
+
(
const
std
::
string
&
lhs
,
const
String
&
rhs
);
friend
String
operator
+
(
const
std
::
string
&
lhs
,
const
String
&
rhs
);
#endif
private
:
private
:
char
*
cstr_
;
char
*
cstr_
;
...
@@ -1049,21 +1029,10 @@ static inline bool operator>= (const String& lhs, const char* rhs) { return lh
...
@@ -1049,21 +1029,10 @@ static inline bool operator>= (const String& lhs, const char* rhs) { return lh
}
// cv
}
// cv
#ifndef OPENCV_NOSTL_TRANSITIONAL
namespace
std
namespace
std
{
{
static
inline
void
swap
(
cv
::
String
&
a
,
cv
::
String
&
b
)
{
a
.
swap
(
b
);
}
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"
#include "opencv2/core/ptr.inl.hpp"
...
...
modules/core/include/opencv2/core/cvstd.inl.hpp
View file @
928bfe0b
...
@@ -44,10 +44,8 @@
...
@@ -44,10 +44,8 @@
#ifndef OPENCV_CORE_CVSTDINL_HPP
#ifndef OPENCV_CORE_CVSTDINL_HPP
#define OPENCV_CORE_CVSTDINL_HPP
#define OPENCV_CORE_CVSTDINL_HPP
#ifndef OPENCV_NOSTL
#include <complex>
# include <complex>
#include <ostream>
# include <ostream>
#endif
//! @cond IGNORED
//! @cond IGNORED
...
@@ -58,7 +56,6 @@
...
@@ -58,7 +56,6 @@
namespace
cv
namespace
cv
{
{
#ifndef OPENCV_NOSTL
template
<
typename
_Tp
>
class
DataType
<
std
::
complex
<
_Tp
>
>
template
<
typename
_Tp
>
class
DataType
<
std
::
complex
<
_Tp
>
>
{
{
...
@@ -280,7 +277,6 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize
...
@@ -280,7 +277,6 @@ static inline std::ostream& operator << (std::ostream& out, const MatSize& msize
return
out
;
return
out
;
}
}
#endif // OPENCV_NOSTL
}
// cv
}
// cv
#ifdef _MSC_VER
#ifdef _MSC_VER
...
...
modules/core/include/opencv2/core/mat.hpp
View file @
928bfe0b
...
@@ -2969,9 +2969,7 @@ public:
...
@@ -2969,9 +2969,7 @@ public:
typedef
const
uchar
**
pointer
;
typedef
const
uchar
**
pointer
;
typedef
uchar
*
reference
;
typedef
uchar
*
reference
;
#ifndef OPENCV_NOSTL
typedef
std
::
random_access_iterator_tag
iterator_category
;
typedef
std
::
random_access_iterator_tag
iterator_category
;
#endif
//! default constructor
//! default constructor
MatConstIterator
();
MatConstIterator
();
...
@@ -3036,9 +3034,7 @@ public:
...
@@ -3036,9 +3034,7 @@ public:
typedef
const
_Tp
*
pointer
;
typedef
const
_Tp
*
pointer
;
typedef
const
_Tp
&
reference
;
typedef
const
_Tp
&
reference
;
#ifndef OPENCV_NOSTL
typedef
std
::
random_access_iterator_tag
iterator_category
;
typedef
std
::
random_access_iterator_tag
iterator_category
;
#endif
//! default constructor
//! default constructor
MatConstIterator_
();
MatConstIterator_
();
...
@@ -3089,9 +3085,7 @@ public:
...
@@ -3089,9 +3085,7 @@ public:
typedef
_Tp
*
pointer
;
typedef
_Tp
*
pointer
;
typedef
_Tp
&
reference
;
typedef
_Tp
&
reference
;
#ifndef OPENCV_NOSTL
typedef
std
::
random_access_iterator_tag
iterator_category
;
typedef
std
::
random_access_iterator_tag
iterator_category
;
#endif
//! the default constructor
//! the default constructor
MatIterator_
();
MatIterator_
();
...
@@ -3225,9 +3219,7 @@ template<typename _Tp> class SparseMatConstIterator_ : public SparseMatConstIter
...
@@ -3225,9 +3219,7 @@ template<typename _Tp> class SparseMatConstIterator_ : public SparseMatConstIter
{
{
public
:
public
:
#ifndef OPENCV_NOSTL
typedef
std
::
forward_iterator_tag
iterator_category
;
typedef
std
::
forward_iterator_tag
iterator_category
;
#endif
//! the default constructor
//! the default constructor
SparseMatConstIterator_
();
SparseMatConstIterator_
();
...
@@ -3261,9 +3253,7 @@ template<typename _Tp> class SparseMatIterator_ : public SparseMatConstIterator_
...
@@ -3261,9 +3253,7 @@ template<typename _Tp> class SparseMatIterator_ : public SparseMatConstIterator_
{
{
public
:
public
:
#ifndef OPENCV_NOSTL
typedef
std
::
forward_iterator_tag
iterator_category
;
typedef
std
::
forward_iterator_tag
iterator_category
;
#endif
//! the default constructor
//! the default constructor
SparseMatIterator_
();
SparseMatIterator_
();
...
...
modules/core/include/opencv2/core/persistence.hpp
View file @
928bfe0b
...
@@ -570,9 +570,7 @@ public:
...
@@ -570,9 +570,7 @@ public:
operator
double
()
const
;
operator
double
()
const
;
//! returns the node content as text string
//! returns the node content as text string
operator
String
()
const
;
operator
String
()
const
;
#ifndef OPENCV_NOSTL
operator
std
::
string
()
const
;
operator
std
::
string
()
const
;
#endif
//! returns pointer to the underlying file node
//! returns pointer to the underlying file node
CvFileNode
*
operator
*
();
CvFileNode
*
operator
*
();
...
...
modules/core/include/opencv2/core/utility.hpp
View file @
928bfe0b
...
@@ -1022,7 +1022,6 @@ template<typename _Tp, size_t fixed_size> inline
...
@@ -1022,7 +1022,6 @@ template<typename _Tp, size_t fixed_size> inline
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
const
_Tp
*
()
const
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
const
_Tp
*
()
const
{
return
ptr
;
}
{
return
ptr
;
}
#ifndef OPENCV_NOSTL
template
<>
inline
std
::
string
CommandLineParser
::
get
<
std
::
string
>
(
int
index
,
bool
space_delete
)
const
template
<>
inline
std
::
string
CommandLineParser
::
get
<
std
::
string
>
(
int
index
,
bool
space_delete
)
const
{
{
return
get
<
String
>
(
index
,
space_delete
);
return
get
<
String
>
(
index
,
space_delete
);
...
@@ -1031,7 +1030,6 @@ template<> inline std::string CommandLineParser::get<std::string>(const String&
...
@@ -1031,7 +1030,6 @@ template<> inline std::string CommandLineParser::get<std::string>(const String&
{
{
return
get
<
String
>
(
name
,
space_delete
);
return
get
<
String
>
(
name
,
space_delete
);
}
}
#endif // OPENCV_NOSTL
//! @endcond
//! @endcond
...
...
modules/photo/src/denoise_tvl1.cpp
View file @
928bfe0b
...
@@ -56,21 +56,8 @@ namespace cv{
...
@@ -56,21 +56,8 @@ namespace cv{
double
_scale
;
double
_scale
;
};
};
#ifndef OPENCV_NOSTL
using
std
::
transform
;
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
){
void
denoise_TVL1
(
const
std
::
vector
<
Mat
>&
observations
,
Mat
&
result
,
double
lambda
,
int
niters
){
CV_Assert
(
observations
.
size
()
>
0
&&
niters
>
0
&&
lambda
>
0
);
CV_Assert
(
observations
.
size
()
>
0
&&
niters
>
0
&&
lambda
>
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment