Skip to content

Commit

Permalink
meta_any: internal change to avoid using data() if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Nov 5, 2024
1 parent 0c5ca2f commit 6b514c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/entt/meta/meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class meta_any {
if constexpr(std::is_function_v<typename std::pointer_traits<Type>::element_type>) {
static_cast<meta_any *>(other)->emplace<Type>(*static_cast<const Type *>(self.data()));
} else if constexpr(!std::is_void_v<std::remove_const_t<typename std::pointer_traits<Type>::element_type>>) {
using in_place_type = decltype(adl_meta_pointer_like<Type>::dereference(*static_cast<const Type *>(self.data())));
using in_place_type = decltype(adl_meta_pointer_like<Type>::dereference(std::declval<const Type &>()));

if constexpr(std::is_constructible_v<bool, Type>) {
if(const auto &pointer_like = *static_cast<const Type *>(self.data()); pointer_like) {
Expand Down

0 comments on commit 6b514c3

Please sign in to comment.