Skip to content

Commit

Permalink
HnMeshUtils: improved message about failed faces
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Oct 11, 2024
1 parent 5e2cc91 commit e8f1dc0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Hydrogent/src/HnMeshUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,17 @@ void HnMeshUtils::Triangulate(bool UseFaceVertexIndices,
}
});
#ifdef DILIGENT_DEVELOPMENT
if (!dvpFailedFaces.empty())
if (const size_t NumFailedFaces = dvpFailedFaces.size())
{
std::stringstream ss;
for (size_t i = 0; i < dvpFailedFaces.size(); ++i)
for (size_t i = 0; i < NumFailedFaces; ++i)
{
ss << dvpFailedFaces[i];
if (i < dvpFailedFaces.size() - 1)
if (i < NumFailedFaces - 1)
ss << ", ";
}
LOG_WARNING_MESSAGE(dvpFailedFaces.size(), " faces in mesh '", m_MeshId.GetString(), "' were triangulated with potential issues: ", ss.str());
LOG_WARNING_MESSAGE(NumFailedFaces, (NumFailedFaces > 1 ? " faces" : " face"), " in mesh '", m_MeshId.GetString(),
(NumFailedFaces > 1 ? "' were" : "' was"), " triangulated with potential issues: ", ss.str());
}
#endif

Expand Down

0 comments on commit e8f1dc0

Please sign in to comment.