Skip to content

Commit

Permalink
fixed clang error with meta
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Oct 10, 2018
1 parent 17d57ee commit 880fba8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/entt/meta/meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ class meta_any final {

destroy = [](storage_type &storage) {
auto *node = internal::meta_info<Type>::resolve();
meta_handle handle = *reinterpret_cast<actual_type *>(&storage);
node->dtor ? node->dtor->invoke(handle) : node->destroy(handle);
auto *instance = reinterpret_cast<actual_type *>(&storage);
node->dtor ? node->dtor->invoke(*instance) : node->destroy(*instance);
};
} else {
using chunk_type = std::aligned_storage_t<sizeof(actual_type), alignof(actual_type)>;
Expand All @@ -420,8 +420,8 @@ class meta_any final {
destroy = [](storage_type &storage) {
auto *node = internal::meta_info<Type>::resolve();
auto *chunk = *reinterpret_cast<chunk_type **>(&storage);
meta_handle handle = *reinterpret_cast<actual_type *>(chunk);
node->dtor ? node->dtor->invoke(handle) : node->destroy(handle);
auto *instance = reinterpret_cast<actual_type *>(chunk);
node->dtor ? node->dtor->invoke(*instance) : node->destroy(*instance);
delete chunk;
};
}
Expand Down

0 comments on commit 880fba8

Please sign in to comment.