fixed multiple warnings from VS2010.

This commit is contained in:
Vadim Pisarevsky
2010-11-25 16:55:46 +00:00
parent 7e5c11a920
commit 1286c1db45
36 changed files with 178 additions and 177 deletions

View File

@@ -41,8 +41,8 @@ namespace cvflann
template<typename T>
Matrix<T> random_sample(Matrix<T>& srcMatrix, long size, bool remove = false)
{
UniqueRandom rand(srcMatrix.rows);
Matrix<T> newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols);
UniqueRandom rand((int)srcMatrix.rows);
Matrix<T> newSet(new T[size * srcMatrix.cols], size, (long)srcMatrix.cols);
T *src,*dest;
for (long i=0;i<size;++i) {
@@ -73,8 +73,8 @@ Matrix<T> random_sample(Matrix<T>& srcMatrix, long size, bool remove = false)
template<typename T>
Matrix<T> random_sample(const Matrix<T>& srcMatrix, size_t size)
{
UniqueRandom rand(srcMatrix.rows);
Matrix<T> newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols);
UniqueRandom rand((int)srcMatrix.rows);
Matrix<T> newSet(new T[size * srcMatrix.cols], (long)size, (long)srcMatrix.cols);
T *src,*dest;
for (size_t i=0;i<size;++i) {