mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Fixed compiler warning
--HG-- extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402715
This commit is contained in:
parent
acb0cae086
commit
1797da9aed
@ -1463,10 +1463,10 @@ namespace dlib
|
||||
}
|
||||
|
||||
|
||||
bool is_copy;
|
||||
matrix* m;
|
||||
mutable long r;
|
||||
mutable long c;
|
||||
bool is_copy;
|
||||
};
|
||||
|
||||
public:
|
||||
|
@ -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 ,"");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user