Skip to content

Commit

Permalink
Better direct access to FCharAttribute type
Browse files Browse the repository at this point in the history
  • Loading branch information
gansm committed Sep 17, 2023
1 parent dcaadb4 commit 1e88fbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion final/ftypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ constexpr auto getFAttributeWord (const FCharAttribute& fchar) noexcept -> uInt3

constexpr auto WordToFAttribute (uInt32 word) noexcept -> FCharAttribute
{
return *reinterpret_cast<FCharAttribute*>(&word);
FCharAttribute fchar{};
memcpy(&fchar, &word, sizeof(fchar));
return fchar;
}

union FAttribute
Expand Down

0 comments on commit 1e88fbc

Please sign in to comment.