Minor changes to avoid compiler warnings from visual studio.

This commit is contained in:
Davis King 2013-04-28 17:56:33 -04:00
parent 758856dff9
commit 0c3952d549
3 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ matrix<double,0,1> apply_cca_transform (
const sparse_vect& v const sparse_vect& v
) )
{ {
pyassert(max_index_plus_one(v) <= m.nr(), "Invalid Inputs"); pyassert((long)max_index_plus_one(v) <= m.nr(), "Invalid Inputs");
return sparse_matrix_vector_multiply(trans(m), v); return sparse_matrix_vector_multiply(trans(m), v);
} }

View File

@ -137,7 +137,7 @@ const binary_test _cross_validate_trainer (
const trainer_type& trainer, const trainer_type& trainer,
const std::vector<typename trainer_type::sample_type>& x, const std::vector<typename trainer_type::sample_type>& x,
const std::vector<double>& y, const std::vector<double>& y,
const long folds const unsigned long folds
) )
{ {
pyassert(is_binary_classification_problem(x,y), "Training data does not make a valid training set."); pyassert(is_binary_classification_problem(x,y), "Training data does not make a valid training set.");

View File

@ -33,7 +33,7 @@ string cv__repr__ (const cv& v)
{ {
std::ostringstream sout; std::ostringstream sout;
sout << "dlib.vector(["; sout << "dlib.vector([";
for (unsigned long i = 0; i < v.size(); ++i) for (long i = 0; i < v.size(); ++i)
{ {
sout << v(i); sout << v(i);
if (i+1 < v.size()) if (i+1 < v.size())