Skip to content

Commit

Permalink
PABLO: use shrink_to_fit function instead of swap
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-iob committed Dec 23, 2020
1 parent 3f78979 commit 735ca2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PABLO/LocalTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ namespace bitpit {
}
}
m_octants.resize(nblock, Octant(m_dim));
octvector(m_octants).swap(m_octants);
m_octants.shrink_to_fit();
m_sizeOctants = m_octants.size();
if(mapsize > 0){
mapidx.resize(m_sizeOctants);
Expand Down Expand Up @@ -635,7 +635,7 @@ namespace bitpit {
}
}
m_octants.resize(m_sizeOctants-offset, Octant(m_dim));
octvector(m_octants).swap(m_octants);
m_octants.shrink_to_fit();
m_sizeOctants = m_octants.size();
if(mapsize > 0){
mapidx.resize(m_sizeOctants);
Expand Down Expand Up @@ -745,7 +745,7 @@ namespace bitpit {
father.setMarker(markerfather);
m_octants.resize(m_sizeOctants-offset, Octant(m_dim));
m_octants.push_back(father);
octvector(m_octants).swap(m_octants);
m_octants.shrink_to_fit();
m_sizeOctants = m_octants.size();
if(mapsize > 0){
mapidx.resize(m_sizeOctants);
Expand Down

0 comments on commit 735ca2d

Please sign in to comment.