diff options
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r-- | src/core/hle/kernel/k_capabilities.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/kernel/physical_core.h | 1 | ||||
-rw-r--r-- | src/core/hle/kernel/svc_version.h | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/kernel/k_capabilities.cpp b/src/core/hle/kernel/k_capabilities.cpp index 64f1d7371..2907cc6e3 100644 --- a/src/core/hle/kernel/k_capabilities.cpp +++ b/src/core/hle/kernel/k_capabilities.cpp @@ -203,23 +203,23 @@ Result KCapabilities::ProcessMapRegionCapability(const u32 cap, F f) { Result KCapabilities::MapRegion_(const u32 cap, KPageTable* page_table) { // Map each region into the process's page table. - R_RETURN(ProcessMapRegionCapability( + return ProcessMapRegionCapability( cap, [](KMemoryRegionType region_type, KMemoryPermission perm) -> Result { // R_RETURN(page_table->MapRegion(region_type, perm)); UNIMPLEMENTED(); R_SUCCEED(); - })); + }); } Result KCapabilities::CheckMapRegion(KernelCore& kernel, const u32 cap) { // Check that each region has a physical backing store. - R_RETURN(ProcessMapRegionCapability( + return ProcessMapRegionCapability( cap, [&](KMemoryRegionType region_type, KMemoryPermission perm) -> Result { R_UNLESS(kernel.MemoryLayout().GetPhysicalMemoryRegionTree().FindFirstDerived( region_type) != nullptr, ResultOutOfRange); R_SUCCEED(); - })); + }); } Result KCapabilities::SetInterruptPairCapability(const u32 cap) { diff --git a/src/core/hle/kernel/physical_core.h b/src/core/hle/kernel/physical_core.h index fb2ba4c6b..fb8e7933e 100644 --- a/src/core/hle/kernel/physical_core.h +++ b/src/core/hle/kernel/physical_core.h @@ -3,6 +3,7 @@ #pragma once +#include <condition_variable> #include <cstddef> #include <memory> #include <mutex> diff --git a/src/core/hle/kernel/svc_version.h b/src/core/hle/kernel/svc_version.h index e4f47b34b..3eb95aa7b 100644 --- a/src/core/hle/kernel/svc_version.h +++ b/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. |