From: eap Date: Wed, 11 Mar 2009 14:49:19 +0000 (+0000) Subject: avoid extra list copying X-Git-Tag: V4_1_5rc1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2980a51007c6b33ec49287e617aff792bc855ce6;p=modules%2Fsmesh.git avoid extra list copying - aRes = (*it).second; + return it->second; --- diff --git a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx index 068dd6255..f40c32c02 100644 --- a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx +++ b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx @@ -44,8 +44,6 @@ #include typedef NCollection_Array1 StdMeshers_Array1OfSequenceOfInteger; -using namespace std; - //======================================================================= //function : StdMeshers_QuadToTriaAdaptor @@ -1005,7 +1003,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh& aMesh) std::list triasI = (*itrmI).second; std::list::iterator ittI = triasI.begin(); int nbfI = triasI.size(); - vector FsI(nbfI); + std::vector FsI(nbfI); k = 0; for(; ittI!=triasI.end(); ittI++) { FsI[k] = (*ittI); @@ -1023,7 +1021,7 @@ bool StdMeshers_QuadToTriaAdaptor::Compute2ndPart(SMESH_Mesh& aMesh) std::list triasJ = (*itrmJ).second; std::list::iterator ittJ = triasJ.begin(); int nbfJ = triasJ.size(); - vector FsJ(nbfJ); + std::vector FsJ(nbfJ); k = 0; for(; ittJ!=triasJ.end(); ittJ++) { FsJ[k] = (*ittJ); @@ -1138,7 +1136,7 @@ std::list StdMeshers_QuadToTriaAdaptor::GetTriangles std::map< const SMDS_MeshElement*, std::list >::iterator it = myResMap.find(aFace); if( it != myResMap.end() ) { - aRes = (*it).second; + return it->second; } return aRes; }