mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 03:50:33 +05:00
avoid extra list copying
- aRes = (*it).second; + return it->second;
This commit is contained in:
parent
44b3e0b765
commit
2980a51007
@ -44,8 +44,6 @@
|
|||||||
#include <NCollection_Array1.hxx>
|
#include <NCollection_Array1.hxx>
|
||||||
typedef NCollection_Array1<TColStd_SequenceOfInteger> StdMeshers_Array1OfSequenceOfInteger;
|
typedef NCollection_Array1<TColStd_SequenceOfInteger> StdMeshers_Array1OfSequenceOfInteger;
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : StdMeshers_QuadToTriaAdaptor
|
//function : StdMeshers_QuadToTriaAdaptor
|
||||||
@ -1005,7 +1003,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh& aMesh)
|
|||||||
std::list<const SMDS_FaceOfNodes*> triasI = (*itrmI).second;
|
std::list<const SMDS_FaceOfNodes*> triasI = (*itrmI).second;
|
||||||
std::list<const SMDS_FaceOfNodes*>::iterator ittI = triasI.begin();
|
std::list<const SMDS_FaceOfNodes*>::iterator ittI = triasI.begin();
|
||||||
int nbfI = triasI.size();
|
int nbfI = triasI.size();
|
||||||
vector<const SMDS_FaceOfNodes*> FsI(nbfI);
|
std::vector<const SMDS_FaceOfNodes*> FsI(nbfI);
|
||||||
k = 0;
|
k = 0;
|
||||||
for(; ittI!=triasI.end(); ittI++) {
|
for(; ittI!=triasI.end(); ittI++) {
|
||||||
FsI[k] = (*ittI);
|
FsI[k] = (*ittI);
|
||||||
@ -1023,7 +1021,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh& aMesh)
|
|||||||
std::list<const SMDS_FaceOfNodes*> triasJ = (*itrmJ).second;
|
std::list<const SMDS_FaceOfNodes*> triasJ = (*itrmJ).second;
|
||||||
std::list<const SMDS_FaceOfNodes*>::iterator ittJ = triasJ.begin();
|
std::list<const SMDS_FaceOfNodes*>::iterator ittJ = triasJ.begin();
|
||||||
int nbfJ = triasJ.size();
|
int nbfJ = triasJ.size();
|
||||||
vector<const SMDS_FaceOfNodes*> FsJ(nbfJ);
|
std::vector<const SMDS_FaceOfNodes*> FsJ(nbfJ);
|
||||||
k = 0;
|
k = 0;
|
||||||
for(; ittJ!=triasJ.end(); ittJ++) {
|
for(; ittJ!=triasJ.end(); ittJ++) {
|
||||||
FsJ[k] = (*ittJ);
|
FsJ[k] = (*ittJ);
|
||||||
@ -1138,7 +1136,7 @@ std::list<const SMDS_FaceOfNodes*> StdMeshers_QuadToTriaAdaptor::GetTriangles
|
|||||||
std::map< const SMDS_MeshElement*,
|
std::map< const SMDS_MeshElement*,
|
||||||
std::list<const SMDS_FaceOfNodes*> >::iterator it = myResMap.find(aFace);
|
std::list<const SMDS_FaceOfNodes*> >::iterator it = myResMap.find(aFace);
|
||||||
if( it != myResMap.end() ) {
|
if( it != myResMap.end() ) {
|
||||||
aRes = (*it).second;
|
return it->second;
|
||||||
}
|
}
|
||||||
return aRes;
|
return aRes;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user