Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/geode/io/model/gid_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
auto attribute = surface.mesh()
.polygon_attribute_manager()
.find_read_only_attribute< geode::index_t >(
attribute_ids.value().at( 0 ) );

Check warning on line 64 in src/geode/io/model/gid_output.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/gid_output.cpp:64:34 [bugprone-unchecked-optional-access]

unchecked access to optional value
return attribute->value( 0 );
}

Expand All @@ -78,7 +78,7 @@
auto attribute = block.mesh()
.polyhedron_attribute_manager()
.find_read_only_attribute< geode::index_t >(
attribute_ids.value().at( 0 ) );

Check warning on line 81 in src/geode/io/model/gid_output.cpp

View workflow job for this annotation

GitHub Actions / test / tidy

src/geode/io/model/gid_output.cpp:81:34 [bugprone-unchecked-optional-access]

unchecked access to optional value
return attribute->value( 0 );
}

Expand Down Expand Up @@ -273,6 +273,14 @@
{
return false;
}
const auto attribute_ids =
surface.mesh()
.polygon_attribute_manager()
.attribute_ids_matching_name( FRACSIMA_ATTRIBUTE_NAME );
if( !attribute_ids )
{
return false;
}
}
for( const auto& block : brep.blocks() )
{
Expand All @@ -281,6 +289,14 @@
{
return false;
}
const auto attribute_ids =
block.mesh()
.polyhedron_attribute_manager()
.attribute_ids_matching_name( FRACSIMA_ATTRIBUTE_NAME );
if( !attribute_ids )
{
return false;
}
}
return true;
}
Expand Down
Loading