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
dcf3d988
Commit
dcf3d988
authored
Jun 28, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8543 from csukuangfj:fix-String
parents
7567eb84
ff31d069
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
cvstd.hpp
modules/core/include/opencv2/core/cvstd.hpp
+5
-1
No files found.
modules/core/include/opencv2/core/cvstd.hpp
View file @
dcf3d988
...
...
@@ -489,7 +489,7 @@ public:
static
const
size_t
npos
=
size_t
(
-
1
);
explicit
String
();
String
();
String
(
const
String
&
str
);
String
(
const
String
&
str
,
size_t
pos
,
size_t
len
=
npos
);
String
(
const
char
*
s
);
...
...
@@ -627,6 +627,7 @@ String::String(const char* s, size_t n)
:
cstr_
(
0
),
len_
(
0
)
{
if
(
!
n
)
return
;
if
(
!
s
)
return
;
memcpy
(
allocate
(
n
),
s
,
n
);
}
...
...
@@ -634,6 +635,7 @@ inline
String
::
String
(
size_t
n
,
char
c
)
:
cstr_
(
0
),
len_
(
0
)
{
if
(
!
n
)
return
;
memset
(
allocate
(
n
),
c
,
n
);
}
...
...
@@ -642,6 +644,7 @@ String::String(const char* first, const char* last)
:
cstr_
(
0
),
len_
(
0
)
{
size_t
len
=
(
size_t
)(
last
-
first
);
if
(
!
len
)
return
;
memcpy
(
allocate
(
len
),
first
,
len
);
}
...
...
@@ -650,6 +653,7 @@ String::String(Iterator first, Iterator last)
:
cstr_
(
0
),
len_
(
0
)
{
size_t
len
=
(
size_t
)(
last
-
first
);
if
(
!
len
)
return
;
char
*
str
=
allocate
(
len
);
while
(
first
!=
last
)
{
...
...
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