From 2980a51007c6b33ec49287e617aff792bc855ce6 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 11 Mar 2009 14:49:19 +0000 Subject: [PATCH] avoid extra list copying - aRes = (*it).second; + return it->second; --- src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; } -- 2.39.2