Fixed compiler warning

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402715
This commit is contained in:
Davis King 2008-12-09 03:03:46 +00:00
parent acb0cae086
commit 1797da9aed
2 changed files with 26 additions and 1 deletions

View File

@ -1463,10 +1463,10 @@ namespace dlib
}
bool is_copy;
matrix* m;
mutable long r;
mutable long c;
bool is_copy;
};
public:

View File

@ -1825,6 +1825,31 @@ namespace
DLIB_CASSERT(( uniform_matrix<double,303,303>(3)*identity_matrix<double,303>() == uniform_matrix<double,303,303>(3) ), "");
}
{
matrix<double> m(2,3);
m << 1,2,3,
5,6,7;
DLIB_CASSERT(m(0,0) == 1 && m(0,1) == 2 && m(0,2) == 3 &&
m(1,0) == 5 && m(1,1) == 6 && m(1,2) == 7,"");
matrix<double,2,3> m2;
m2 << 1,2,3,
5,6,7;
DLIB_CASSERT(m2(0,0) == 1 && m2(0,1) == 2 && m2(0,2) == 3 &&
m2(1,0) == 5 && m2(1,1) == 6 && m2(1,2) == 7,"");
matrix<double,2,1> m3;
m3 << 1,
5;
DLIB_CASSERT(m3(0) == 1 && m3(1) == 5 ,"");
matrix<double,1,2> m4;
m4 << 1, 5;
DLIB_CASSERT(m3(0) == 1 && m3(1) == 5 ,"");
}
}