Browse Source
Merge pull request #9765 from liamwhite/ffs-apple
kernel: avoid usage of bit_cast
pull/15/merge
bunnei
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/core/hle/kernel/svc_version.h
|
|
|
@ -35,11 +35,11 @@ constexpr inline u32 EncodeKernelVersion(u32 major, u32 minor) { |
|
|
|
} |
|
|
|
|
|
|
|
constexpr inline u32 GetKernelMajorVersion(u32 encoded) { |
|
|
|
return std::bit_cast<decltype(KernelVersion::major_version)>(encoded).Value(); |
|
|
|
return decltype(KernelVersion::major_version)::ExtractValue(encoded); |
|
|
|
} |
|
|
|
|
|
|
|
constexpr inline u32 GetKernelMinorVersion(u32 encoded) { |
|
|
|
return std::bit_cast<decltype(KernelVersion::minor_version)>(encoded).Value(); |
|
|
|
return decltype(KernelVersion::minor_version)::ExtractValue(encoded); |
|
|
|
} |
|
|
|
|
|
|
|
// Nintendo doesn't support programs targeting SVC versions < 3.0. |
|
|
|
|