diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-20 03:43:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 03:43:47 +0200 |
commit | b5d21cc1b1733c7f03e1179dbddc932cbf716490 (patch) | |
tree | 029380b1e216f8b8244258de496dea327043e1d7 /src/common | |
parent | Merge pull request #6310 from german77/nanMotion (diff) | |
parent | parent_of_member: Make sign conversion explicit in OffsetOfImpl() (diff) | |
download | yuzu-b5d21cc1b1733c7f03e1179dbddc932cbf716490.tar yuzu-b5d21cc1b1733c7f03e1179dbddc932cbf716490.tar.gz yuzu-b5d21cc1b1733c7f03e1179dbddc932cbf716490.tar.bz2 yuzu-b5d21cc1b1733c7f03e1179dbddc932cbf716490.tar.lz yuzu-b5d21cc1b1733c7f03e1179dbddc932cbf716490.tar.xz yuzu-b5d21cc1b1733c7f03e1179dbddc932cbf716490.tar.zst yuzu-b5d21cc1b1733c7f03e1179dbddc932cbf716490.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/parent_of_member.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/parent_of_member.h b/src/common/parent_of_member.h index e0f8ab5c8..58c70b0e7 100644 --- a/src/common/parent_of_member.h +++ b/src/common/parent_of_member.h @@ -109,7 +109,8 @@ struct OffsetOfCalculator { } } - return (next - start) * sizeof(MemberType) + Offset; + return static_cast<ptrdiff_t>(static_cast<size_t>(next - start) * sizeof(MemberType) + + Offset); } static constexpr std::ptrdiff_t OffsetOf(MemberType ParentType::*member) { |