Skip to content

Expand Some GF Headers - #313

Open
SuperDude88 wants to merge 2 commits into
encounter:mainfrom
SuperDude88:main
Open

SuperDude88 wants to merge 2 commits into
encounter:mainfrom
SuperDude88:main

Conversation

@SuperDude88

Copy link
Copy Markdown
Contributor

No description provided.

}

inline void GFWrite_f32(f32 f) {
GXCmd1u32(*reinterpret_cast<u32*>(&f)); // TODO: should this be a bit_cast

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not update to std::bit_cast before landing?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mirroring convo from Discord: neither solution is acceptable as this header should work from plain C too. And pointer casting isn't valid due to strict aliasing in C++.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... memset would be portable to C.

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.

3 participants