From a33ad67da1285111b4c8d2592540617e54edf377 Mon Sep 17 00:00:00 2001 From: Casper Lamboo Date: Fri, 1 Dec 2023 10:57:21 +0100 Subject: [PATCH] Use explicit `std::optional` utility functions CURA-11359 --- src/bridge.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bridge.cpp b/src/bridge.cpp index 91616a1d87..aeae8aeb9e 100644 --- a/src/bridge.cpp +++ b/src/bridge.cpp @@ -195,11 +195,11 @@ double bridgeAngle( } } - if (! idx1 || ! idx2) + if (! idx1.hasValue() || ! idx2.hasValue()) return -1.0; - Point2LL center1 = islands[*idx1].centerOfMass(); - Point2LL center2 = islands[*idx2].centerOfMass(); + Point2LL center1 = islands[idx1.value()].centerOfMass(); + Point2LL center2 = islands[idx2.value()].centerOfMass(); return angle(center2 - center1); }