summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-05-20 03:43:47 +0200
committerGitHub <noreply@github.com>2021-05-20 03:43:47 +0200
commitb5d21cc1b1733c7f03e1179dbddc932cbf716490 (patch)
tree029380b1e216f8b8244258de496dea327043e1d7
parentMerge pull request #6310 from german77/nanMotion (diff)
parentparent_of_member: Make sign conversion explicit in OffsetOfImpl() (diff)
downloadyuzu-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
-rw-r--r--src/common/parent_of_member.h3
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) {