Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
5b32723f
Commit
5b32723f
authored
May 27, 2018
by
Davis King
Browse files
Avoid implicitly copying a matrix to numpy_image.
parent
fff97234
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dlib/python/numpy_image.h
dlib/python/numpy_image.h
+4
-2
No files found.
dlib/python/numpy_image.h
View file @
5b32723f
...
@@ -188,15 +188,17 @@ namespace dlib
...
@@ -188,15 +188,17 @@ namespace dlib
return
*
this
;
return
*
this
;
}
}
template
<
long
NR
,
long
NC
>
numpy_image
(
numpy_image
(
matrix
<
pixel_type
>&&
rhs
matrix
<
pixel_type
,
NR
,
NC
>&&
rhs
)
)
{
{
*
this
=
convert_to_numpy
(
std
::
move
(
rhs
));
*
this
=
convert_to_numpy
(
std
::
move
(
rhs
));
}
}
template
<
long
NR
,
long
NC
>
numpy_image
&
operator
=
(
numpy_image
&
operator
=
(
matrix
<
pixel_type
>&&
rhs
matrix
<
pixel_type
,
NR
,
NC
>&&
rhs
)
)
{
{
*
this
=
convert_to_numpy
(
std
::
move
(
rhs
));
*
this
=
convert_to_numpy
(
std
::
move
(
rhs
));
...
...
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