From 1b28acd061b92f9b43b5486ac3dfdd3e48f85c6b Mon Sep 17 00:00:00 2001 From: artem-ogre Date: Mon, 13 Nov 2023 14:41:08 +0100 Subject: [PATCH] Small fixes and improvements --- CDT/include/CDTUtils.hpp | 2 ++ CDT/include/Triangulation.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CDT/include/CDTUtils.hpp b/CDT/include/CDTUtils.hpp index 443b828..001098a 100644 --- a/CDT/include/CDTUtils.hpp +++ b/CDT/include/CDTUtils.hpp @@ -164,6 +164,7 @@ CDT_INLINE_IF_HEADER_ONLY Index opoNbr(const Index vertIndex) if(vertIndex == Index(2)) return Index(0); assert(false && "Invalid vertex index"); + throw std::runtime_error("Invalid vertex index"); } CDT_INLINE_IF_HEADER_ONLY Index opoVrt(const Index neighborIndex) @@ -175,6 +176,7 @@ CDT_INLINE_IF_HEADER_ONLY Index opoVrt(const Index neighborIndex) if(neighborIndex == Index(2)) return Index(1); assert(false && "Invalid neighbor index"); + throw std::runtime_error("Invalid neighbor index"); } CDT_INLINE_IF_HEADER_ONLY Index diff --git a/CDT/include/Triangulation.hpp b/CDT/include/Triangulation.hpp index 5dbcc61..0a86a29 100644 --- a/CDT/include/Triangulation.hpp +++ b/CDT/include/Triangulation.hpp @@ -764,7 +764,7 @@ void Triangulation::conformToEdgeIteration( { // make sure to report original input edges in the exception Edge e1 = pieceToOriginals.count(edge) - ? pieceToOriginals[e1].front() + ? pieceToOriginals[edge].front() : edge; Edge e2(iVleft, iVright); e2 = pieceToOriginals.count(e2) ? pieceToOriginals[e2].front()