Fix several warnings and potentially uninitialized data

This commit is contained in:
Magne Sjaastad
2020-03-03 20:22:03 +01:00
parent e297b34609
commit 8c485ab81c
6 changed files with 23 additions and 4 deletions

View File

@@ -182,7 +182,7 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
// End loop local memory
#pragma omp for // default scheduling absolutely best
for ( int ntVxIdx = 0; ntVxIdx < nativeTriangleIndices.size(); ntVxIdx += 3 )
for ( int ntVxIdx = 0; ntVxIdx < static_cast<int>( nativeTriangleIndices.size() ); ntVxIdx += 3 )
{
cvf::Vec3d p0 = nativeVertices[nativeTriangleIndices[ntVxIdx + 0]];
cvf::Vec3d p1 = nativeVertices[nativeTriangleIndices[ntVxIdx + 1]];

View File

@@ -456,7 +456,7 @@ void RivSurfacePartMgr::calculateVertexTextureCoordinates( cvf::Vec2fArray*
cvf::Vec2f* rawPtr = textureCoords->ptr();
#pragma omp parallel for
for ( int vxIdx = 0; vxIdx < numVertices; vxIdx++ )
for ( int vxIdx = 0; vxIdx < static_cast<int>( numVertices ); vxIdx++ )
{
double cellScalarValue = resultAccessor->cellScalarGlobIdx( vertexToCellIdxMap[vxIdx] );
cvf::Vec2f texCoord = mapper->mapToTextureCoord( cellScalarValue );