Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change cardid to uint64_t #719

Merged
merged 2 commits into from
Feb 3, 2025
Merged

change cardid to uint64_t #719

merged 2 commits into from
Feb 3, 2025

Conversation

salix5
Copy link
Collaborator

@salix5 salix5 commented Feb 3, 2025

5.2.10 Reinterpret cast
[expr.reinterpret.cast]
paragraph 7
An object pointer can be explicitly converted to an object pointer of a different type. When a prvalue v of object pointer type is converted to the object pointer type “pointer to cv T”, the result is static_cast<cv T*>(static_cast<cv void*>(v)).
Converting a prvalue of type “pointer to T1” to the type “pointer to T2” (where T1 and T2 are object types and where the alignment requirements of T2 are no stricter than those of T1) and back to its original type yields the original pointer value.

ygopro is full of pointer casting.
Since effect is 8 bytes alignment now, card and group should be 8 bytes alignment.

card
group
為了讓指針轉型成立,都改成8對齊

@mercury233
@purerosefallen
@Wind2009-Louse
@fallenstardust

@salix5 salix5 merged commit 4c33fa9 into master Feb 3, 2025
1 check passed
@salix5 salix5 deleted the patch-align branch February 3, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant