From fac109fa4b72bf614711db457592038219f192b3 Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Mon, 8 Feb 2010 16:13:17 +0000 Subject: [PATCH] Avoiding implicit type casts in normal calculation routine. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@270 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/Mesh/PolyMeshT.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMesh/Core/Mesh/PolyMeshT.cc b/src/OpenMesh/Core/Mesh/PolyMeshT.cc index d5546bca..9f59518d 100644 --- a/src/OpenMesh/Core/Mesh/PolyMeshT.cc +++ b/src/OpenMesh/Core/Mesh/PolyMeshT.cc @@ -127,7 +127,7 @@ calc_face_normal(const Point& _p0, // The expression ((n *= (1.0/norm)),n) is used because the OpenSG // vector class does not return self after component-wise // self-multiplication with a scalar!!! - return (norm != Scalar(0)) ? ((n *= (Scalar(1)/norm)),n) : Normal(0,0,0); + return (norm != typename Normal::value_type(0)) ? ((n *= (typename Normal::value_type(1)/norm)),n) : Normal(0,0,0); #else Point p1p0 = _p0; p1p0 -= _p1; Point p1p2 = _p2; p1p2 -= _p1;