Skip to content

Commit

Permalink
Correct bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cbritopacheco committed Nov 12, 2023
1 parent 2af5995 commit a3d7075
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Rodin/Geometry/MeshBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,12 @@ namespace Rodin::Geometry
Mesh<Context::Serial>::Builder&
Mesh<Context::Serial>::Builder::reserve(size_t d, size_t count)
{
m_connectivity.reserve(d, count);
m_attributeIndex.reserve(d, count);
m_transformationIndex[d].write([&](auto& obj){ obj.reserve(count); });
if (count > 0)
{
m_connectivity.reserve(d, count);
m_attributeIndex.reserve(d, count);
m_transformationIndex[d].write([&](auto& obj){ obj.reserve(count); });
}
return *this;
}

Expand Down

0 comments on commit a3d7075

Please sign in to comment.