From 0c3952d5493fee24ad7ae5b7eedefb74f0259769 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sun, 28 Apr 2013 17:56:33 -0400 Subject: [PATCH] Minor changes to avoid compiler warnings from visual studio. --- tools/python/src/cca.cpp | 2 +- tools/python/src/svm_c_trainer.cpp | 2 +- tools/python/src/vector.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/python/src/cca.cpp b/tools/python/src/cca.cpp index eca521a68..bdb6dcfb0 100644 --- a/tools/python/src/cca.cpp +++ b/tools/python/src/cca.cpp @@ -48,7 +48,7 @@ matrix apply_cca_transform ( 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); } diff --git a/tools/python/src/svm_c_trainer.cpp b/tools/python/src/svm_c_trainer.cpp index 1d35a5567..1229868a3 100644 --- a/tools/python/src/svm_c_trainer.cpp +++ b/tools/python/src/svm_c_trainer.cpp @@ -137,7 +137,7 @@ const binary_test _cross_validate_trainer ( const trainer_type& trainer, const std::vector& x, const std::vector& y, - const long folds + const unsigned long folds ) { pyassert(is_binary_classification_problem(x,y), "Training data does not make a valid training set."); diff --git a/tools/python/src/vector.cpp b/tools/python/src/vector.cpp index 833b11a70..19263658d 100644 --- a/tools/python/src/vector.cpp +++ b/tools/python/src/vector.cpp @@ -33,7 +33,7 @@ string cv__repr__ (const cv& v) { std::ostringstream sout; sout << "dlib.vector(["; - for (unsigned long i = 0; i < v.size(); ++i) + for (long i = 0; i < v.size(); ++i) { sout << v(i); if (i+1 < v.size())