mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-17 14:22:13 +02:00
ncm: move protected funcs
This commit is contained in:
parent
fc3cede285
commit
54a4bdbedc
@ -197,6 +197,18 @@ namespace ams::ncm {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s64 CalculateContentRequiredSize() const {
|
||||||
|
s64 required_size = 0;
|
||||||
|
for (size_t i = 0; i < this->GetContentCount(); i++) {
|
||||||
|
required_size += CalculateRequiredSize(this->GetContentInfo(i)->info.GetSize());
|
||||||
|
}
|
||||||
|
return required_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetStorageId(StorageId storage_id) {
|
||||||
|
this->GetWritableHeader()->storage_id = static_cast<u8>(storage_id);
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const void *GetData() const {
|
const void *GetData() const {
|
||||||
return this->data;
|
return this->data;
|
||||||
@ -295,19 +307,6 @@ namespace ams::ncm {
|
|||||||
std::optional<ApplicationId> GetApplicationId() const {
|
std::optional<ApplicationId> GetApplicationId() const {
|
||||||
return this->GetApplicationId(this->GetKey());
|
return this->GetApplicationId(this->GetKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
s64 CalculateContentRequiredSize() const {
|
|
||||||
s64 required_size = 0;
|
|
||||||
for (size_t i = 0; i < this->GetContentCount(); i++) {
|
|
||||||
required_size += CalculateRequiredSize(this->GetContentInfo(i)->info.GetSize());
|
|
||||||
}
|
|
||||||
return required_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetStorageId(StorageId storage_id) {
|
|
||||||
this->GetWritableHeader()->storage_id = static_cast<u8>(storage_id);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ContentMetaReader : public ContentMetaAccessor<ContentMetaHeader, ContentInfo> {
|
class ContentMetaReader : public ContentMetaAccessor<ContentMetaHeader, ContentInfo> {
|
||||||
|
Loading…
Reference in New Issue
Block a user