diff --git a/mdal/frmts/mdal_xmdf.cpp b/mdal/frmts/mdal_xmdf.cpp index 340722b9..b2b5583f 100644 --- a/mdal/frmts/mdal_xmdf.cpp +++ b/mdal/frmts/mdal_xmdf.cpp @@ -515,19 +515,19 @@ std::unique_ptr< MDAL::Mesh > MDAL::DriverXmdf::load( const std::string &meshFil std::vector elementsDims = elements.dims(); hsize_t elementsRows = elementsDims[0]; - int elementsRowsDims = elementsDims[1]; + hsize_t elementsRowsDims = elementsDims[1]; std::vector facesData = elements.readArrayInt(); Faces faces( elementsRows ); - int maxVerticesPerFace = 0; + size_t maxVerticesPerFace = 0; size_t currentFaceIndex = 0; i = 0; while ( i < facesData.size() ) { std::vector tempFace; - for ( int j = 0; j < elementsRowsDims; j++ ) + for ( hsize_t j = 0; j < elementsRowsDims; j++ ) { int vertexIndex = facesData[i]; if ( vertexIndex > 0 ) @@ -539,7 +539,7 @@ std::unique_ptr< MDAL::Mesh > MDAL::DriverXmdf::load( const std::string &meshFil } // only store faces with more than 2 vertices - if ( tempFace.size() > 2 ) + if ( tempFace.size() > static_cast( 2 ) ) { Face &face = faces[currentFaceIndex]; std::copy( tempFace.begin(), tempFace.end(), std::back_inserter( face ) ); @@ -556,7 +556,7 @@ std::unique_ptr< MDAL::Mesh > MDAL::DriverXmdf::load( const std::string &meshFil facesData.clear(); // copy only the faces that have been properly filled - faces = Faces( faces.begin(), faces.begin() + currentFaceIndex ); + faces = Faces( faces.begin(), faces.begin() + static_cast( currentFaceIndex ) ); // create the mesh and set the required data std::unique_ptr< MemoryMesh > mesh( diff --git a/mdal/mdal.cpp b/mdal/mdal.cpp index 6ac3107a..6faa0d42 100644 --- a/mdal/mdal.cpp +++ b/mdal/mdal.cpp @@ -605,7 +605,7 @@ void MDAL_M_RemoveDatasetGroup( MDAL_MeshH mesh, int index ) } size_t i = static_cast( index ); - m->datasetGroups.erase( m->datasetGroups.begin() + i ); + m->datasetGroups.erase( m->datasetGroups.begin() + static_cast( i ) ); } const char *MDAL_M_driverName( MDAL_MeshH mesh )