summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-05-10 14:06:19 +0200
committerLioncash <mathew1800@gmail.com>2021-05-10 14:07:33 +0200
commit0aff3ba2ffd00d3bc605d468d70815731a7ec6b0 (patch)
tree77cba0f592e277f9ca36fc6bae5ade792eab826d
parentMerge pull request #6291 from lioncash/kern-shadow (diff)
downloadyuzu-0aff3ba2ffd00d3bc605d468d70815731a7ec6b0.tar
yuzu-0aff3ba2ffd00d3bc605d468d70815731a7ec6b0.tar.gz
yuzu-0aff3ba2ffd00d3bc605d468d70815731a7ec6b0.tar.bz2
yuzu-0aff3ba2ffd00d3bc605d468d70815731a7ec6b0.tar.lz
yuzu-0aff3ba2ffd00d3bc605d468d70815731a7ec6b0.tar.xz
yuzu-0aff3ba2ffd00d3bc605d468d70815731a7ec6b0.tar.zst
yuzu-0aff3ba2ffd00d3bc605d468d70815731a7ec6b0.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) {