Skip to content

Commit 65296c3

Browse files
authored
fix(ModelHelpers): windows issue with concurrent tasks while creating model aabb
1 parent 8363b21 commit 65296c3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/geode/model/helpers/aabb_model_helpers.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ namespace
5151
geode::index_t id{ 0 };
5252
for( const auto& element : range )
5353
{
54-
tasks[id++] = async::spawn( [id, &mapping, &boxes, &element] {
54+
tasks[id] = async::spawn( [id, &mapping, &boxes, &element] {
5555
mapping[id] = element.id();
5656
boxes[id] = element.mesh().bounding_box();
5757
} );
58+
id++;
5859
}
5960
async::when_all( tasks.begin(), tasks.end() ).wait();
6061
return std::make_tuple(
@@ -93,4 +94,4 @@ namespace geode
9394
{
9495
return create_aabb< 2 >( model.surfaces(), model.nb_surfaces() );
9596
}
96-
} // namespace geode
97+
} // namespace geode

0 commit comments

Comments
 (0)