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
9ac9e9e2
Commit
9ac9e9e2
authored
Feb 09, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix String::end() implementation
parent
3450528f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
cvstd.hpp
modules/core/include/opencv2/core/cvstd.hpp
+1
-1
test_misc.cpp
modules/core/test/test_misc.cpp
+7
-0
No files found.
modules/core/include/opencv2/core/cvstd.hpp
View file @
9ac9e9e2
...
...
@@ -748,7 +748,7 @@ const char* String::begin() const
inline
const
char
*
String
::
end
()
const
{
return
len_
?
cstr_
+
1
:
0
;
return
len_
?
cstr_
+
len_
:
NULL
;
}
inline
...
...
modules/core/test/test_misc.cpp
View file @
9ac9e9e2
...
...
@@ -138,3 +138,10 @@ TEST(Core_String, find_last_of__with__empty_string)
// npos is not exported: EXPECT_EQ(cv::String::npos, p);
EXPECT_EQ
(
std
::
string
::
npos
,
p
);
}
TEST
(
Core_String
,
end_method_regression
)
{
cv
::
String
old_string
=
"012345"
;
cv
::
String
new_string
(
old_string
.
begin
(),
old_string
.
end
());
EXPECT_EQ
(
6u
,
new_string
.
size
());
}
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