mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
Merge pull request #6297 from lioncash/common-conv
parent_of_member: Make sign conversion explicit in OffsetOfImpl()
This commit is contained in:
commit
b5d21cc1b1
|
@ -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) {
|
static constexpr std::ptrdiff_t OffsetOf(MemberType ParentType::*member) {
|
||||||
|
|
Loading…
Reference in a new issue