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
1da8a19a
Commit
1da8a19a
authored
Aug 05, 2016
by
MYLS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed two bugs that I caused.
parent
86238d27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
persistence.cpp
modules/core/src/persistence.cpp
+8
-2
No files found.
modules/core/src/persistence.cpp
View file @
1da8a19a
...
@@ -1176,13 +1176,13 @@ static void check_if_write_struct_is_delayed( CvFileStorage* fs, bool change_typ
...
@@ -1176,13 +1176,13 @@ static void check_if_write_struct_is_delayed( CvFileStorage* fs, bool change_typ
std
::
string
type_name
;
std
::
string
type_name
;
int
struct_flags
=
fs
->
delayed_struct_flags
;
int
struct_flags
=
fs
->
delayed_struct_flags
;
if
(
fs
->
delayed_struct_key
!=
0
&&
*
fs
->
delayed_
type_name
!=
'\0'
)
if
(
fs
->
delayed_struct_key
!=
0
&&
*
fs
->
delayed_
struct_key
!=
'\0'
)
{
{
struct_key
.
assign
(
fs
->
delayed_struct_key
);
struct_key
.
assign
(
fs
->
delayed_struct_key
);
}
}
if
(
fs
->
delayed_type_name
!=
0
&&
*
fs
->
delayed_type_name
!=
'\0'
)
if
(
fs
->
delayed_type_name
!=
0
&&
*
fs
->
delayed_type_name
!=
'\0'
)
{
{
struct_key
.
assign
(
fs
->
delayed_type_name
);
type_name
.
assign
(
fs
->
delayed_type_name
);
}
}
/* reset */
/* reset */
...
@@ -1949,6 +1949,9 @@ icvYMLStartWriteStruct( CvFileStorage* fs, const char* key, int struct_flags,
...
@@ -1949,6 +1949,9 @@ icvYMLStartWriteStruct( CvFileStorage* fs, const char* key, int struct_flags,
char
buf
[
CV_FS_MAX_LEN
+
1024
];
char
buf
[
CV_FS_MAX_LEN
+
1024
];
const
char
*
data
=
0
;
const
char
*
data
=
0
;
if
(
type_name
&&
*
type_name
==
'\0'
)
type_name
=
0
;
struct_flags
=
(
struct_flags
&
(
CV_NODE_TYPE_MASK
|
CV_NODE_FLOW
))
|
CV_NODE_EMPTY
;
struct_flags
=
(
struct_flags
&
(
CV_NODE_TYPE_MASK
|
CV_NODE_FLOW
))
|
CV_NODE_EMPTY
;
if
(
!
CV_NODE_IS_COLLECTION
(
struct_flags
))
if
(
!
CV_NODE_IS_COLLECTION
(
struct_flags
))
CV_Error
(
CV_StsBadArg
,
CV_Error
(
CV_StsBadArg
,
...
@@ -2914,6 +2917,9 @@ icvXMLStartWriteStruct( CvFileStorage* fs, const char* key, int struct_flags,
...
@@ -2914,6 +2917,9 @@ icvXMLStartWriteStruct( CvFileStorage* fs, const char* key, int struct_flags,
CV_Error
(
CV_StsBadArg
,
CV_Error
(
CV_StsBadArg
,
"Some collection type: CV_NODE_SEQ or CV_NODE_MAP must be specified"
);
"Some collection type: CV_NODE_SEQ or CV_NODE_MAP must be specified"
);
if
(
type_name
&&
*
type_name
==
'\0'
)
type_name
=
0
;
if
(
type_name
)
if
(
type_name
)
{
{
attr
[
idx
++
]
=
"type_id"
;
attr
[
idx
++
]
=
"type_id"
;
...
...
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