Skip to content

Commit

Permalink
#2063: Update void* to std::byte* in collection
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable authored and cwschilly committed Sep 20, 2024
1 parent de8f55c commit e06f058
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/vt/context/runnable_context/collection.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ struct Collection {
void resume();

private:
std::function<void(void* in_elm)> set_; /**< Set context function */
std::function<void(std::byte* in_elm)> set_; /**< Set context function */
std::function<void()> clear_; /**< Clear context function */
void* elm_ = nullptr; /**< The element (untyped) */
std::byte* elm_ = nullptr; /**< The element (untyped) */
};

}} /* end namespace vt::ctx */
Expand Down
6 changes: 3 additions & 3 deletions src/vt/context/runnable_context/collection.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ template <typename IndexT>
/*explicit*/ Collection::Collection(
vrt::collection::Indexable<IndexT>* elm
) {
elm_ = elm;
set_ = [](void* in_elm){
auto e = static_cast<vrt::collection::Indexable<IndexT>*>(in_elm);
elm_ = reinterpret_cast<std::byte*>(elm);
set_ = [](std::byte* in_elm){
auto e = reinterpret_cast<vrt::collection::Indexable<IndexT>*>(in_elm);
auto& idx_ = e->getIndex();
auto proxy_ = e->getProxy();
vrt::collection::CollectionContextHolder<IndexT>::set(&idx_, proxy_);
Expand Down

0 comments on commit e06f058

Please sign in to comment.