File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,8 @@ namespace geode
290290 {
291291 OPENGEODE_EXCEPTION ( polygon_id < mesh.nb_polygons (),
292292 " [Impl::polygon_minimum_height] Wrong polygon id" );
293- return mesh.polygon ( polygon_id ).minimum_height ();
293+ const auto polygon = mesh.polygon ( polygon_id );
294+ return polygon.minimum_height ();
294295 }
295296
296297 std::optional< PolygonVertex > polygon_around_vertex (
@@ -1138,7 +1139,8 @@ namespace geode
11381139 SurfaceMesh< dimension >::polygon_normal( index_t polygon_id ) const
11391140 {
11401141 check_polygon_id ( *this , polygon_id );
1141- return this ->polygon ( polygon_id ).normal ();
1142+ const auto polygon = this ->polygon ( polygon_id );
1143+ return polygon.normal ();
11421144 }
11431145
11441146 template < index_t dimension >
@@ -1170,7 +1172,8 @@ namespace geode
11701172 index_t polygon_id ) const
11711173 {
11721174 check_polygon_id ( *this , polygon_id );
1173- return this ->polygon ( polygon_id ).is_degenerated ();
1175+ const auto polygon = this ->polygon ( polygon_id );
1176+ return polygon.is_degenerated ();
11741177 }
11751178
11761179 template < index_t dimension >
You can’t perform that action at this time.
0 commit comments