From 41fda194bd5baa4902dd3eb8abf24829d39d466b Mon Sep 17 00:00:00 2001 From: cnr-isti-vclab Date: Thu, 11 Feb 2010 20:06:14 +0000 Subject: [PATCH] Correctly defined int inside loop as per MSVC requirements, changed assert as to be more accurate --- vcg/math/spherical_harmonics.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vcg/math/spherical_harmonics.h b/vcg/math/spherical_harmonics.h index 4251dec1..acc3307f 100644 --- a/vcg/math/spherical_harmonics.h +++ b/vcg/math/spherical_harmonics.h @@ -109,7 +109,7 @@ public : */ static ScalarType Real(unsigned l, int m, ScalarType theta, ScalarType phi) { - assert((int)-l <= m && m <= (int)l && theta >= 0 && theta <= M_PI && phi >= 0 && phi <= 2 * M_PI); + assert((int)-l <= m && m <= (int)l && theta >= 0.0 && theta <= (ScalarType)M_PI && phi >= 0.0 && phi <= (ScalarType)(2.0 * M_PI)); if (m > 0) return SQRT_TWO * complex_spherical_harmonic_re(l, m, theta, phi); @@ -170,7 +170,7 @@ public : static SphericalHarmonics Wrap(ScalarType * _coefficients) { SphericalHarmonics sph; - for(i = 0; i < (int) MAX_BAND * MAX_BAND; ++i) sph.coefficients[i] = _coefficients[i]; + for(int i = 0; i < (int) MAX_BAND * MAX_BAND; ++i) sph.coefficients[i] = _coefficients[i]; return sph; }