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
21bb17e3
Commit
21bb17e3
authored
Nov 27, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13292 from mshabunin:fix-filenode-compat
parents
51cc78b2
9de63c1e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
persistence.hpp
modules/core/include/opencv2/core/persistence.hpp
+2
-2
persistence.cpp
modules/core/src/persistence.cpp
+2
-4
No files found.
modules/core/include/opencv2/core/persistence.hpp
View file @
21bb17e3
...
...
@@ -565,7 +565,7 @@ public:
//! returns the node content as double
operator
double
()
const
;
//! returns the node content as text string
operator
std
::
string
()
const
;
inline
operator
std
::
string
()
const
{
return
this
->
string
();
}
static
bool
isMap
(
int
flags
);
static
bool
isSeq
(
int
flags
);
...
...
@@ -599,7 +599,7 @@ public:
//! Simplified reading API to use with bindings.
CV_WRAP
double
real
()
const
;
//! Simplified reading API to use with bindings.
CV_WRAP
S
tring
string
()
const
;
CV_WRAP
std
::
s
tring
string
()
const
;
//! Simplified reading API to use with bindings.
CV_WRAP
Mat
mat
()
const
;
...
...
modules/core/src/persistence.cpp
View file @
21bb17e3
...
...
@@ -2197,7 +2197,8 @@ FileNode::operator double() const
return
DBL_MAX
;
}
FileNode
::
operator
std
::
string
()
const
double
FileNode
::
real
()
const
{
return
double
(
*
this
);
}
std
::
string
FileNode
::
string
()
const
{
const
uchar
*
p
=
ptr
();
if
(
!
p
||
(
*
p
&
TYPE_MASK
)
!=
STRING
)
...
...
@@ -2206,9 +2207,6 @@ FileNode::operator std::string() const
size_t
sz
=
(
size_t
)(
unsigned
)
readInt
(
p
);
return
std
::
string
((
const
char
*
)(
p
+
4
),
sz
-
1
);
}
double
FileNode
::
real
()
const
{
return
double
(
*
this
);
}
std
::
string
FileNode
::
string
()
const
{
return
std
::
string
(
*
this
);
}
Mat
FileNode
::
mat
()
const
{
Mat
value
;
read
(
*
this
,
value
,
Mat
());
return
value
;
}
FileNodeIterator
FileNode
::
begin
()
const
{
return
FileNodeIterator
(
*
this
,
false
);
}
...
...
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