Skip to content

Commit

Permalink
Fix compiler warning, don't try and delete void pointers
Browse files Browse the repository at this point in the history
  • Loading branch information
cfis committed Nov 17, 2024
1 parent bacc7bc commit 67f34c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rice/detail/Wrapper.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ namespace Rice::detail
{
Registries::instance.instances.remove(this->get());

if (this->isOwner_)
if constexpr (!std::is_void_v<T>)
{
delete this->data_;
if (this->isOwner_)
{
delete this->data_;
}
}
}

Expand Down

0 comments on commit 67f34c1

Please sign in to comment.