Skip to content

Commit

Permalink
Fix Resource arrow operator missing const and dynamic cast
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasLrx committed Apr 29, 2024
1 parent 331c583 commit 67f3801
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ecstasy/resources/Resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ namespace ecstasy
///
R *operator->()
{
return this;
return dynamic_cast<R *>(this);
}

/// @copydoc Resource::operator->()
const R *operator->() const
{
return dynamic_cast<const R *>(this);
}
};
} // namespace ecstasy
Expand Down

0 comments on commit 67f3801

Please sign in to comment.