Added to possibility to compile unit tests at maximum warning level.

Silenced (amongst others) many conversion related warnings.
This commit is contained in:
Hauke Heibel
2009-12-12 11:39:07 +01:00
parent 494a88685e
commit d088ee35f6
38 changed files with 135 additions and 44 deletions

View File

@@ -160,7 +160,7 @@ class FFT
dst.resize( (src.size()>>1)+1);
else
dst.resize(src.size());
fwd(&dst[0],&src[0],src.size());
fwd(&dst[0],&src[0],static_cast<int>(src.size()));
}
template<typename InputDerived, typename ComplexDerived>
@@ -224,7 +224,7 @@ class FFT
dst.resize( 2*(src.size()-1) );
else
dst.resize( src.size() );
inv( &dst[0],&src[0],dst.size() );
inv( &dst[0],&src[0],static_cast<int>(dst.size()) );
}
// TODO: multi-dimensional FFTs

View File

@@ -74,6 +74,8 @@ struct ei_intersector_helper1
bool intersectObject(const Object1 &obj) { return intersector.intersectObjectObject(obj, stored); }
Object2 stored;
Intersector &intersector;
private:
ei_intersector_helper1& operator=(const ei_intersector_helper1&);
};
template<typename Volume2, typename Object2, typename Object1, typename Intersector>
@@ -216,6 +218,8 @@ struct ei_minimizer_helper2
Scalar minimumOnObject(const Object2 &obj) { return minimizer.minimumOnObjectObject(stored, obj); }
Object1 stored;
Minimizer &minimizer;
private:
ei_minimizer_helper2& operator=(const ei_minimizer_helper2&);
};
/** Given two BVH's, runs the query on their cartesian product encapsulated by \a minimizer.

View File

@@ -107,7 +107,7 @@ public:
children.clear();
objects.insert(objects.end(), begin, end);
int n = objects.size();
int n = static_cast<int>(objects.size());
if(n < 2)
return; //if we have at most one object, we don't need any internal nodes
@@ -149,7 +149,7 @@ public:
return;
}
int numBoxes = boxes.size();
int numBoxes = static_cast<int>(boxes.size());
int idx = index * 2;
if(children[idx + 1] < numBoxes) { //second index is always bigger

View File

@@ -247,7 +247,7 @@ struct ei_kiss_cpx_fft
int u,k,q1,q;
Complex * twiddles = &m_twiddles[0];
Complex t;
int Norig = m_twiddles.size();
int Norig = static_cast<int>(m_twiddles.size());
Complex * scratchbuf = &m_scratchBuf[0];
for ( u=0; u<m; ++u ) {
@@ -262,7 +262,7 @@ struct ei_kiss_cpx_fft
int twidx=0;
Fout[ k ] = scratchbuf[0];
for (q=1;q<p;++q ) {
twidx += fstride * k;
twidx += static_cast<int>(fstride) * k;
if (twidx>=Norig) twidx-=Norig;
t=scratchbuf[q] * twiddles[twidx];
Fout[ k ] += t;

View File

@@ -292,7 +292,7 @@ void MatrixExponential<MatrixType>::computeUV(float)
} else {
const float maxnorm = 3.925724783138660f;
m_squarings = std::max(0, (int)ceil(log2(m_l1norm / maxnorm)));
MatrixType A = *m_M / std::pow(Scalar(2), Scalar(m_squarings));
MatrixType A = *m_M / std::pow(Scalar(2), Scalar(static_cast<RealScalar>(m_squarings)));
pade7(A);
}
}