diff --git a/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp b/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp index 24637f64618f610dacbb6fc125e6cc10c74c1050..731173f578025273fcbc4c40fe299fb0faa63a62 100644 --- a/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp +++ b/MeshGeoToolsLib/AppendLinesAlongPolyline.cpp @@ -35,9 +35,9 @@ MeshLib::Mesh* appendLinesAlongPolylines(const MeshLib::Mesh &mesh, const GeoLib for (auto e : vec_new_eles) max_matID = std::max(max_matID, e->getValue()); - const size_t n_ply (ply_vec.size()); + const std::size_t n_ply (ply_vec.size()); // for each polyline - for (size_t k(0); k < n_ply; k++) + for (std::size_t k(0); k < n_ply; k++) { const GeoLib::Polyline* ply = (*ply_vec.getVector())[k]; @@ -52,7 +52,7 @@ MeshLib::Mesh* appendLinesAlongPolylines(const MeshLib::Mesh &mesh, const GeoLib } // add line elements - for (size_t i=0; i<vec_nodes_on_ply.size()-1; i++) { + for (std::size_t i=0; i<vec_nodes_on_ply.size()-1; i++) { std::array<MeshLib::Node*, 2> element_nodes; element_nodes[0] = vec_new_nodes[vec_nodes_on_ply[i]]; element_nodes[1] = vec_new_nodes[vec_nodes_on_ply[i+1]]; diff --git a/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp b/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp index 4e3fdd5aca5db410868931273baadb53594434ba..83c154dfb3f3d0eb11b7e09d40d8b578e970772e 100644 --- a/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp +++ b/MeshGeoToolsLib/BoundaryElementsOnSurface.cpp @@ -36,8 +36,8 @@ BoundaryElementsOnSurface::BoundaryElementsOnSurface(MeshLib::Mesh const& mesh, for (unsigned i=0; i<e->getNFaces(); i++) { auto* face = e->getFace(i); // check - size_t cnt_match = 0; - for (size_t j=0; j<face->getNBaseNodes(); j++) { + std::size_t cnt_match = 0; + for (std::size_t j=0; j<face->getNBaseNodes(); j++) { if (std::find(node_ids_on_sfc.begin(), node_ids_on_sfc.end(), face->getNodeIndex(j)) != node_ids_on_sfc.end()) cnt_match++; else diff --git a/MeshGeoToolsLib/GeoMapper.cpp b/MeshGeoToolsLib/GeoMapper.cpp index 1963bbcafb911789efcedf78e0d2cbbc1e95587a..3f7914d61ca288c5081de6830c2587247a01ad9c 100644 --- a/MeshGeoToolsLib/GeoMapper.cpp +++ b/MeshGeoToolsLib/GeoMapper.cpp @@ -112,7 +112,7 @@ void GeoMapper::mapData() min_val = bounding_box.getMinPoint()[2]; max_val = bounding_box.getMaxPoint()[2]; } - size_t nPoints (points->size()); + std::size_t nPoints (points->size()); if (!is_borehole) { @@ -133,7 +133,7 @@ void GeoMapper::mapData() GeoLib::StationBorehole* borehole = static_cast<GeoLib::StationBorehole*>(pnt); const std::vector<GeoLib::Point*> layers = borehole->getProfile(); - size_t nLayers = layers.size(); + std::size_t nLayers = layers.size(); for (unsigned k=0; k<nLayers; ++k) { GeoLib::Point* layer_pnt = layers[k]; @@ -204,7 +204,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string & // copy geometry (and set z=0 for all points) unsigned nGeoPoints ( points->size() ); std::vector<GeoLib::Point*> *new_points = new std::vector<GeoLib::Point*>(nGeoPoints); - for (size_t i=0; i<nGeoPoints; ++i) + for (std::size_t i=0; i<nGeoPoints; ++i) (*new_points)[i] = new GeoLib::Point((*(*points)[i])[0],(*(*points)[i])[1],0.0); std::vector<GeoLib::Polyline*> *new_lines (copyPolylinesVector(this->_geo_objects.getPolylineVec(this->_geo_name), new_points)); @@ -215,7 +215,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string & const unsigned nMeshNodes ( mesh->getNNodes() ); std::vector<int> closest_geo_point(nMeshNodes); // index of closest geo point for each mesh node in (x,y)-plane std::vector<double> dist(nMeshNodes); // distance between geo points and mesh nodes in (x,y)-plane - for (size_t i=0; i<nMeshNodes; ++i) + for (std::size_t i=0; i<nMeshNodes; ++i) { const double zero_coords[3] = {(* mesh->getNode(i))[0], (* mesh->getNode(i))[1], 0.0}; GeoLib::Point* pnt = grid.getNearestPoint(zero_coords); @@ -224,7 +224,7 @@ void GeoMapper::advancedMapOnMesh(const MeshLib::Mesh* mesh, const std::string & } // store for each point the line segment to which it was added. - const size_t nLines (new_lines->size()); + const std::size_t nLines (new_lines->size()); std::vector< std::vector<unsigned> > line_segment_map(nLines); for (std::size_t i=0; i<nLines; ++i) { diff --git a/MeshGeoToolsLib/MeshNodesAlongPolyline.cpp b/MeshGeoToolsLib/MeshNodesAlongPolyline.cpp index 2795f044615e73faeb1619d8e71dfa53482bd31d..aab12d85138b6ebe5aa8424e3bf92c3dcbbd0796 100644 --- a/MeshGeoToolsLib/MeshNodesAlongPolyline.cpp +++ b/MeshGeoToolsLib/MeshNodesAlongPolyline.cpp @@ -33,7 +33,7 @@ MeshNodesAlongPolyline::MeshNodesAlongPolyline( const std::size_t n_nodes (search_all_nodes ? _mesh.getNNodes() : _mesh.getNBaseNodes()); auto &mesh_nodes = _mesh.getNodes(); // loop over all nodes - for (size_t i = 0; i < n_nodes; i++) { + for (std::size_t i = 0; i < n_nodes; i++) { double dist = _ply.getDistanceAlongPolyline(*mesh_nodes[i], epsilon_radius); if (dist >= 0.0) { _msh_node_ids.push_back(mesh_nodes[i]->getID()); @@ -51,7 +51,7 @@ MeshLib::Mesh const& MeshNodesAlongPolyline::getMesh () const return _mesh; } -std::vector<size_t> const& MeshNodesAlongPolyline::getNodeIDs () const +std::vector<std::size_t> const& MeshNodesAlongPolyline::getNodeIDs () const { return _msh_node_ids; } diff --git a/MeshGeoToolsLib/MeshNodesAlongSurface.cpp b/MeshGeoToolsLib/MeshNodesAlongSurface.cpp index 79b61cd03c7a2098fb317c1e76e04c6df8d9b59a..bf25042943627827e00acb23fec9e1b55023e0c1 100644 --- a/MeshGeoToolsLib/MeshNodesAlongSurface.cpp +++ b/MeshGeoToolsLib/MeshNodesAlongSurface.cpp @@ -30,7 +30,7 @@ MeshNodesAlongSurface::MeshNodesAlongSurface( auto& mesh_nodes = _mesh.getNodes(); const std::size_t n_nodes (search_all_nodes ? _mesh.getNNodes() : _mesh.getNBaseNodes()); // loop over all nodes - for (size_t i = 0; i < n_nodes; i++) { + for (std::size_t i = 0; i < n_nodes; i++) { auto* node = mesh_nodes[i]; if (!sfc.isPntInBoundingVolume(node->getCoords())) continue;