From 3dba30c2407f8e05e774acec248f4fa3aba6d46a Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Wed, 21 Nov 2012 16:18:06 +0100 Subject: [PATCH] regression fix regression fix introduced by 013f92ba2619e60748b8e6f034fa621cd0e30c36 Signed-off-by: Thorsten Liebig --- FDTD/operator.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index b8fbd98..c3f2903 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -199,7 +199,9 @@ double Operator::GetNodeWidth(int ny, const int pos[3], bool dualMesh) const if ( (pos[0]<0) || (pos[1]<0) || (pos[2]<0) ) return 0.0; - return GetNodeWidth(ny, pos, dualMesh); + //call the unsigned int version of GetNodeWidth + unsigned int uiPos[]={(unsigned int)pos[0],(unsigned int)pos[1],(unsigned int)pos[2]}; + return GetNodeWidth(ny, uiPos, dualMesh); } double Operator::GetNodeArea(int ny, const unsigned int pos[3], bool dualMesh) const @@ -214,7 +216,9 @@ double Operator::GetNodeArea(int ny, const int pos[3], bool dualMesh) const if ( (pos[0]<0) || (pos[1]<0) || (pos[2]<0) ) return 0.0; - return GetNodeArea(ny, pos, dualMesh); + //call the unsigned int version of GetNodeArea + unsigned int uiPos[]={(unsigned int)pos[0],(unsigned int)pos[1],(unsigned int)pos[2]}; + return GetNodeArea(ny, uiPos, dualMesh); } unsigned int Operator::SnapToMeshLine(int ny, double coord, bool &inside, bool dualMesh) const