Skip to content

Commit

Permalink
Change std::make_pairs to C++11 standard without template arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jriegel committed Aug 13, 2014
1 parent 36a0641 commit b5431d5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
8 changes: 3 additions & 5 deletions src/Mod/Mesh/App/Core/Evaluation.cpp
Expand Up @@ -368,8 +368,7 @@ bool MeshEvalTopology::Evaluate ()
else {
if (count > 2) {
// Edge that is shared by more than 2 facets
nonManifoldList.push_back(std::make_pair
<unsigned long, unsigned long>(p0, p1));
nonManifoldList.push_back(std::make_pair(p0, p1));
nonManifoldFacets.push_back(facets);
}

Expand All @@ -395,7 +394,7 @@ void MeshEvalTopology::GetFacetManifolds (std::vector<unsigned long> &raclFacetI
for (int i = 0; i < 3; i++) {
unsigned long ulPt0 = std::min<unsigned long>(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]);
unsigned long ulPt1 = std::max<unsigned long>(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]);
std::pair<unsigned long, unsigned long> edge = std::make_pair<unsigned long, unsigned long>(ulPt0, ulPt1);
std::pair<unsigned long,unsigned long> edge = std::make_pair(ulPt0, ulPt1);

if (std::find(nonManifoldList.begin(), nonManifoldList.end(), edge) != nonManifoldList.end())
raclFacetIndList.push_back(pI - rclFAry.begin());
Expand Down Expand Up @@ -745,8 +744,7 @@ void MeshEvalSelfIntersection::GetIntersections(std::vector<std::pair<unsigned l
facet2 = *cMFI;
int ret = facet1.IntersectWithFacet(facet2, pt1, pt2);
if (ret == 2) {
intersection.push_back(std::make_pair
<unsigned long, unsigned long>(*it,*jt));
intersection.push_back(std::make_pair (*it,*jt));
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Mesh/App/Core/MeshKernel.cpp
Expand Up @@ -193,7 +193,7 @@ unsigned long MeshKernel::AddFacets(const std::vector<MeshFacet> &rclFAry)
unsigned long ulT1 = pF->_aulPoints[(i+1)%3];
unsigned long ulP0 = std::min<unsigned long>(ulT0, ulT1);
unsigned long ulP1 = std::max<unsigned long>(ulT0, ulT1);
edgeMap[std::make_pair<unsigned long, unsigned long>(ulP0, ulP1)].push_front(k);
edgeMap[std::make_pair(ulP0, ulP1)].push_front(k);
}
}

Expand All @@ -210,7 +210,7 @@ unsigned long MeshKernel::AddFacets(const std::vector<MeshFacet> &rclFAry)
unsigned long ulT1 = pF->_aulPoints[(i+1)%3];
unsigned long ulP0 = std::min<unsigned long>(ulT0, ulT1);
unsigned long ulP1 = std::max<unsigned long>(ulT0, ulT1);
std::pair<unsigned long, unsigned long> edge = std::make_pair<unsigned long, unsigned long>(ulP0, ulP1);
std::pair<unsigned long, unsigned long> edge = std::make_pair(ulP0, ulP1);
std::map<std::pair<unsigned long, unsigned long>, std::list<unsigned long> >::iterator pI = edgeMap.find(edge);
// Does the current facet share the same edge?
if (pI != edgeMap.end()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Mesh/App/Core/TopoAlgorithm.cpp
Expand Up @@ -444,7 +444,7 @@ void MeshTopoAlgorithm::AdjustEdgesToCurvatureDirection()
unsigned long ulT1 = jt->_aulPoints[(i+1)%3];
unsigned long ulP0 = std::min<unsigned long>(ulT0, ulT1);
unsigned long ulP1 = std::max<unsigned long>(ulT0, ulT1);
aclEdgeMap[std::make_pair<unsigned long, unsigned long>(ulP0, ulP1)].push_front(k);
aclEdgeMap[std::make_pair(ulP0, ulP1)].push_front(k);
aIdx.push_back( (int)jt->_aulPoints[i] );
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/Mod/Mesh/App/Mesh.cpp
Expand Up @@ -1147,8 +1147,7 @@ void MeshObject::removeSelfIntersections(const std::vector<unsigned long>& indic
for (it = indices.begin(); it != indices.end(); ) {
unsigned long id1 = *it; ++it;
unsigned long id2 = *it; ++it;
selfIntersections.push_back(std::make_pair
<unsigned long, unsigned long>(id1,id2));
selfIntersections.push_back(std::make_pair(id1,id2));
}

if (!selfIntersections.empty()) {
Expand Down
3 changes: 1 addition & 2 deletions src/Mod/Mesh/Gui/ViewProviderDefects.cpp
Expand Up @@ -646,8 +646,7 @@ void ViewProviderMeshSelfIntersections::showDefects(const std::vector<unsigned l
for (it = indices.begin(); it != indices.end(); ) {
unsigned long id1 = *it; ++it;
unsigned long id2 = *it; ++it;
intersection.push_back(std::make_pair
<unsigned long, unsigned long>(id1,id2));
intersection.push_back(std::make_pair(id1,id2));
}

std::vector<std::pair<Base::Vector3f, Base::Vector3f> > lines;
Expand Down

0 comments on commit b5431d5

Please sign in to comment.