Skip to content

Commit

Permalink
Rename cast to try_cast for optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev authored Jan 23, 2024
1 parent a7c165c commit df4de97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/cordl_internals/unity-utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ template <typename T> struct UnityW {
return UnityW<U>(::il2cpp_utils::cast<U>(const_cast<T *>(this->innerPtr)));
}

template <typename U> inline std::optional<UnityW<U>> cast() const {
template <typename U> inline std::optional<UnityW<U>> try_cast() const {
auto attemptedCast =
::il2cpp_utils::try_cast<U>(const_cast<T *>(this->innerPtr));
if (!attemptedCast)
Expand Down

0 comments on commit df4de97

Please sign in to comment.