Mesh: modernize C++: use range-based for loop
This commit is contained in:
@@ -64,8 +64,8 @@ QVariant PropertyMeshKernelItem::value(const App::Property*) const
|
||||
int ctF = 0;
|
||||
|
||||
const std::vector<App::Property*>& props = getPropertyData();
|
||||
for (std::vector<App::Property*>::const_iterator pt = props.begin(); pt != props.end(); ++pt) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)(*pt);
|
||||
for (auto prop : props) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)prop;
|
||||
const MeshKernel& rMesh = pPropMesh->getValue().getKernel();
|
||||
ctP += (int)rMesh.CountPoints();
|
||||
ctE += (int)rMesh.CountEdges();
|
||||
@@ -110,8 +110,8 @@ int PropertyMeshKernelItem::countPoints() const
|
||||
{
|
||||
int ctP = 0;
|
||||
const std::vector<App::Property*>& props = getPropertyData();
|
||||
for (std::vector<App::Property*>::const_iterator pt = props.begin(); pt != props.end(); ++pt) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)(*pt);
|
||||
for (auto prop : props) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)prop;
|
||||
const MeshKernel& rMesh = pPropMesh->getValue().getKernel();
|
||||
ctP += (int)rMesh.CountPoints();
|
||||
}
|
||||
@@ -123,8 +123,8 @@ int PropertyMeshKernelItem::countEdges() const
|
||||
{
|
||||
int ctE = 0;
|
||||
const std::vector<App::Property*>& props = getPropertyData();
|
||||
for (std::vector<App::Property*>::const_iterator pt = props.begin(); pt != props.end(); ++pt) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)(*pt);
|
||||
for (auto prop : props) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)prop;
|
||||
const MeshKernel& rMesh = pPropMesh->getValue().getKernel();
|
||||
ctE += (int)rMesh.CountEdges();
|
||||
}
|
||||
@@ -136,8 +136,8 @@ int PropertyMeshKernelItem::countFaces() const
|
||||
{
|
||||
int ctF = 0;
|
||||
const std::vector<App::Property*>& props = getPropertyData();
|
||||
for (std::vector<App::Property*>::const_iterator pt = props.begin(); pt != props.end(); ++pt) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)(*pt);
|
||||
for (auto prop : props) {
|
||||
Mesh::PropertyMeshKernel* pPropMesh = (Mesh::PropertyMeshKernel*)prop;
|
||||
const MeshKernel& rMesh = pPropMesh->getValue().getKernel();
|
||||
ctF += (int)rMesh.CountFacets();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user