Commit 60f3dda3 authored by Davis King's avatar Davis King

Added missing & symbols to the return types of the matrix cast operators.

Now vector_to_matrix() and array_to_matrix() produce matrix expressions
that return their elements by reference rather than by value.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403024
parent 97759301
......@@ -1145,12 +1145,12 @@ namespace dlib
{
}
const typename M::value_type operator() (
const typename M::value_type& operator() (
long r,
long
) const { return m[r]; }
const typename M::value_type operator() ( long i ) const
const typename M::value_type& operator() ( long i ) const
{ return m[i]; }
template <typename U, long iNR, long iNC, typename MM, typename L>
......@@ -1228,12 +1228,12 @@ namespace dlib
{
}
const typename M::type operator() (
const typename M::type& operator() (
long r,
long
) const { return m[r]; }
const typename M::type operator() ( long i ) const
const typename M::type& operator() ( long i ) const
{ return m[i]; }
template <typename U, long iNR, long iNC, typename MM, typename L>
......@@ -1311,7 +1311,7 @@ namespace dlib
{
}
const typename M::type operator() (
const typename M::type& operator() (
long r,
long c
) const { return m[r][c]; }
......
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