AppFwk : Add missing initialization of variables and handling of switch statements

This commit is contained in:
Magne Sjaastad 2018-02-23 20:03:19 +01:00
parent 671818d72e
commit 70faea56df
3 changed files with 6 additions and 2 deletions

View File

@ -43,7 +43,7 @@ namespace caf {
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
VecIjk::VecIjk(size_t i, size_t j, size_t k) VecIjk::VecIjk(size_t i, size_t j, size_t k)
{ {
m_values = { i, j, k }; m_values = { {i, j, k} };
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -198,6 +198,8 @@ void StructGridInterface::neighborIJKAtCellFace(size_t i, size_t j, size_t k, Fa
case NEG_J : if (j > 0) (*nj)--; else (*nj) = cvf::UNDEFINED_SIZE_T; break; case NEG_J : if (j > 0) (*nj)--; else (*nj) = cvf::UNDEFINED_SIZE_T; break;
case POS_K : (*nk)++; break; case POS_K : (*nk)++; break;
case NEG_K : if (k > 0) (*nk)--; else (*nk) = cvf::UNDEFINED_SIZE_T; break; case NEG_K : if (k > 0) (*nk)--; else (*nk) = cvf::UNDEFINED_SIZE_T; break;
default:
break;
} }
} }

View File

@ -134,7 +134,9 @@ bool HexGridIntersectionTools::planeTriangleIntersection(const cvf::Plane& plane
CVF_ASSERT(false); CVF_ASSERT(false);
} }
bool ok1, ok2; bool ok1 = false;
bool ok2 = false;
if (topVx == 1) if (topVx == 1)
{ {
ok1 = planeLineIntersect(plane, p1, p2, &((*newVx1).vx), &((*newVx1).normDistFromEdgeVx1)); ok1 = planeLineIntersect(plane, p1, p2, &((*newVx1).vx), &((*newVx1).normDistFromEdgeVx1));