diff options
| author | 2024-01-25 21:12:44 -0500 | |
|---|---|---|
| committer | 2024-01-25 22:18:37 -0500 | |
| commit | 431df5ae931b1b0229bdabd5855ee148a3baf001 (patch) | |
| tree | bbd1986098644ad323da6977d8a8b7ec197975be /src/core/hle/service/jit | |
| parent | Merge pull request #12759 from liamwhite/mp-misc (diff) | |
| download | yuzu-431df5ae931b1b0229bdabd5855ee148a3baf001.tar.gz yuzu-431df5ae931b1b0229bdabd5855ee148a3baf001.tar.xz yuzu-431df5ae931b1b0229bdabd5855ee148a3baf001.zip | |
cmif_types: improve ergonomics of types
Diffstat (limited to 'src/core/hle/service/jit')
| -rw-r--r-- | src/core/hle/service/jit/jit.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp index d8fefff89..1f2cbcb61 100644 --- a/src/core/hle/service/jit/jit.cpp +++ b/src/core/hle/service/jit/jit.cpp | |||
| @@ -27,7 +27,7 @@ static_assert(sizeof(Struct32) == 32, "Struct32 has wrong size"); | |||
| 27 | class IJitEnvironment final : public ServiceFramework<IJitEnvironment> { | 27 | class IJitEnvironment final : public ServiceFramework<IJitEnvironment> { |
| 28 | public: | 28 | public: |
| 29 | explicit IJitEnvironment(Core::System& system_, | 29 | explicit IJitEnvironment(Core::System& system_, |
| 30 | Kernel::KScopedAutoObject<Kernel::KProcess>&& process_, | 30 | Kernel::KScopedAutoObject<Kernel::KProcess> process_, |
| 31 | CodeMemory&& user_rx_, CodeMemory&& user_ro_) | 31 | CodeMemory&& user_rx_, CodeMemory&& user_ro_) |
| 32 | : ServiceFramework{system_, "IJitEnvironment"}, process{std::move(process_)}, | 32 | : ServiceFramework{system_, "IJitEnvironment"}, process{std::move(process_)}, |
| 33 | user_rx{std::move(user_rx_)}, user_ro{std::move(user_ro_)}, | 33 | user_rx{std::move(user_rx_)}, user_ro{std::move(user_ro_)}, |
| @@ -129,7 +129,7 @@ public: | |||
| 129 | Result LoadPlugin(u64 tmem_size, InCopyHandle<Kernel::KTransferMemory>& tmem, | 129 | Result LoadPlugin(u64 tmem_size, InCopyHandle<Kernel::KTransferMemory>& tmem, |
| 130 | InBuffer<BufferAttr_HipcMapAlias> nrr, | 130 | InBuffer<BufferAttr_HipcMapAlias> nrr, |
| 131 | InBuffer<BufferAttr_HipcMapAlias> nro) { | 131 | InBuffer<BufferAttr_HipcMapAlias> nro) { |
| 132 | if (tmem.IsNull()) { | 132 | if (!tmem) { |
| 133 | LOG_ERROR(Service_JIT, "Invalid transfer memory handle!"); | 133 | LOG_ERROR(Service_JIT, "Invalid transfer memory handle!"); |
| 134 | R_THROW(ResultUnknown); | 134 | R_THROW(ResultUnknown); |
| 135 | } | 135 | } |
| @@ -271,15 +271,15 @@ private: | |||
| 271 | u64 rx_size, u64 ro_size, InCopyHandle<Kernel::KProcess>& process, | 271 | u64 rx_size, u64 ro_size, InCopyHandle<Kernel::KProcess>& process, |
| 272 | InCopyHandle<Kernel::KCodeMemory>& rx_mem, | 272 | InCopyHandle<Kernel::KCodeMemory>& rx_mem, |
| 273 | InCopyHandle<Kernel::KCodeMemory>& ro_mem) { | 273 | InCopyHandle<Kernel::KCodeMemory>& ro_mem) { |
| 274 | if (process.IsNull()) { | 274 | if (!process) { |
| 275 | LOG_ERROR(Service_JIT, "process is null"); | 275 | LOG_ERROR(Service_JIT, "process is null"); |
| 276 | R_THROW(ResultUnknown); | 276 | R_THROW(ResultUnknown); |
| 277 | } | 277 | } |
| 278 | if (rx_mem.IsNull()) { | 278 | if (!rx_mem) { |
| 279 | LOG_ERROR(Service_JIT, "rx_mem is null"); | 279 | LOG_ERROR(Service_JIT, "rx_mem is null"); |
| 280 | R_THROW(ResultUnknown); | 280 | R_THROW(ResultUnknown); |
| 281 | } | 281 | } |
| 282 | if (rx_mem.IsNull()) { | 282 | if (!ro_mem) { |
| 283 | LOG_ERROR(Service_JIT, "ro_mem is null"); | 283 | LOG_ERROR(Service_JIT, "ro_mem is null"); |
| 284 | R_THROW(ResultUnknown); | 284 | R_THROW(ResultUnknown); |
| 285 | } | 285 | } |
| @@ -291,8 +291,8 @@ private: | |||
| 291 | R_TRY(ro.Initialize(*process, *ro_mem, ro_size, Kernel::Svc::MemoryPermission::Read, | 291 | R_TRY(ro.Initialize(*process, *ro_mem, ro_size, Kernel::Svc::MemoryPermission::Read, |
| 292 | generate_random)); | 292 | generate_random)); |
| 293 | 293 | ||
| 294 | *out_jit_environment = std::make_shared<IJitEnvironment>(system, std::move(process), | 294 | *out_jit_environment = |
| 295 | std::move(rx), std::move(ro)); | 295 | std::make_shared<IJitEnvironment>(system, process.Get(), std::move(rx), std::move(ro)); |
| 296 | R_SUCCEED(); | 296 | R_SUCCEED(); |
| 297 | } | 297 | } |
| 298 | 298 | ||