mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-23 18:02:46 -06:00
parent_of_member: Make sign conversion explicit in OffsetOfImpl()
Previously these conversions were implicit and causing quite a few warnings on clang.
This commit is contained in:
parent
ec50a9b5b9
commit
0aff3ba2ff
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue