mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-18 06:32:14 +02:00
ncm: fix forward declarations
This commit is contained in:
parent
d11ecc9208
commit
dd00963b57
@ -25,8 +25,8 @@ namespace ams::ncm {
|
|||||||
private:
|
private:
|
||||||
std::unique_ptr<Impl> impl;
|
std::unique_ptr<Impl> impl;
|
||||||
public:
|
public:
|
||||||
SubmissionPackageInstallTask() { /* ... */ }
|
SubmissionPackageInstallTask();
|
||||||
virtual ~SubmissionPackageInstallTask() override { /* ... */ }
|
virtual ~SubmissionPackageInstallTask() override;
|
||||||
|
|
||||||
Result Initialize(fs::FileHandle handle, StorageId storage_id, void *buffer, size_t buffer_size, bool ignore_ticket);
|
Result Initialize(fs::FileHandle handle, StorageId storage_id, void *buffer, size_t buffer_size, bool ignore_ticket);
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,8 @@ namespace ams::ncm {
|
|||||||
fs::FileHandleStorage storage;
|
fs::FileHandleStorage storage;
|
||||||
std::optional<impl::MountName> mount_name;
|
std::optional<impl::MountName> mount_name;
|
||||||
public:
|
public:
|
||||||
explicit Impl(fs::FileHandle handle) : storage(handle), mount_name(std::nullopt) { /* ... */ }
|
explicit Impl(fs::FileHandle file) : storage(file), mount_name(std::nullopt) { /* ... */ }
|
||||||
|
|
||||||
~Impl() {
|
~Impl() {
|
||||||
if (this->mount_name) {
|
if (this->mount_name) {
|
||||||
fs::fsa::Unregister(this->mount_name->str);
|
fs::fsa::Unregister(this->mount_name->str);
|
||||||
@ -47,21 +48,18 @@ namespace ams::ncm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const impl::MountName &GetMountName() const {
|
const impl::MountName &GetMountName() const {
|
||||||
return this->mount_name;
|
return *this->mount_name;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SubmissionPackageInstallTask::~SubmissionPackageInstallTask() {
|
SubmissionPackageInstallTask::SubmissionPackageInstallTask() { /* ... */ }
|
||||||
if (this->impl != nullptr) {
|
SubmissionPackageInstallTask::~SubmissionPackageInstallTask() { /* ... */ }
|
||||||
delete this->impl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Result SubmissionPackageInstallTask::Initialize(fs::FileHandle handle, StorageId storage_id, void *buffer, size_t buffer_size, bool ignore_ticket) {
|
Result SubmissionPackageInstallTask::Initialize(fs::FileHandle file, StorageId storage_id, void *buffer, size_t buffer_size, bool ignore_ticket) {
|
||||||
AMS_ASSERT(!this->impl);
|
AMS_ASSERT(!this->impl);
|
||||||
|
|
||||||
/* Allocate impl. */
|
/* Allocate impl. */
|
||||||
this->impl.reset(new (std::nothrow) Impl(handle));
|
this->impl.reset(new (std::nothrow) Impl(file));
|
||||||
R_UNLESS(this->impl != nullptr, ncm::ResultAllocationFailed());
|
R_UNLESS(this->impl != nullptr, ncm::ResultAllocationFailed());
|
||||||
|
|
||||||
/* Initialize impl. */
|
/* Initialize impl. */
|
||||||
|
Loading…
Reference in New Issue
Block a user