Commit 5b32723f authored by Davis King's avatar Davis King

Avoid implicitly copying a matrix to numpy_image.

parent fff97234
...@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment