mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-13 20:52:15 +02:00
ncm_types: Address review
This commit is contained in:
parent
46b0d45aad
commit
3b731c9bf2
@ -58,7 +58,7 @@ namespace ams::ncm {
|
||||
char name[0x10];
|
||||
};
|
||||
|
||||
struct PlaceHolderId {
|
||||
alignas(8) struct PlaceHolderId {
|
||||
util::Uuid uuid;
|
||||
|
||||
bool operator==(const PlaceHolderId& other) const {
|
||||
@ -76,11 +76,11 @@ namespace ams::ncm {
|
||||
bool operator!=(const util::Uuid& other) const {
|
||||
return this->uuid != other;
|
||||
}
|
||||
} __attribute__((aligned(8)));
|
||||
};
|
||||
|
||||
static_assert(__alignof__(PlaceHolderId) == 8, "PlaceHolderId definition!");
|
||||
static_assert(alignof(PlaceHolderId) == 8, "PlaceHolderId definition!");
|
||||
|
||||
struct ContentId {
|
||||
alignas(4) struct ContentId {
|
||||
util::Uuid uuid;
|
||||
|
||||
bool operator==(const ContentId& other) const {
|
||||
@ -98,12 +98,12 @@ namespace ams::ncm {
|
||||
bool operator!=(const util::Uuid& other) const {
|
||||
return this->uuid != other;
|
||||
}
|
||||
} __attribute__((aligned(4)));
|
||||
};
|
||||
|
||||
static_assert(__alignof__(ContentId) == 4, "ContentId definition!");
|
||||
static_assert(alignof(ContentId) == 4, "ContentId definition!");
|
||||
|
||||
static constexpr PlaceHolderId InvalidPlaceHolderId = { util::InvalidUuid };
|
||||
static constexpr ContentId InvalidContentId = { util::InvalidUuid };
|
||||
constexpr inline PlaceHolderId InvalidPlaceHolderId = { util::InvalidUuid };
|
||||
constexpr inline ContentId InvalidContentId = { util::InvalidUuid };
|
||||
|
||||
struct ContentInfo {
|
||||
ContentId content_id;
|
||||
@ -114,8 +114,8 @@ namespace ams::ncm {
|
||||
|
||||
static_assert(sizeof(ContentInfo) == 0x18, "ContentInfo definition!");
|
||||
|
||||
typedef void (*MakeContentPathFunc)(char* out, ContentId content_id, const char* root);
|
||||
typedef void (*MakePlaceHolderPathFunc)(char* out, PlaceHolderId placeholder_id, const char* root);
|
||||
using MakeContentPathFunc = void (*)(char* out, ContentId content_id, const char* root);
|
||||
using MakePlaceHolderPathFunc = void (*)(char* out, PlaceHolderId placeholder_id, const char* root);
|
||||
|
||||
/* Storage IDs. */
|
||||
enum class StorageId : u8 {
|
||||
@ -594,7 +594,7 @@ namespace ams::ncm {
|
||||
static_assert(sizeof(ContentMetaKey) == 0x10, "ContentMetaKey definition!");
|
||||
|
||||
/* Used by system updates. They share the exact same struct as ContentMetaKey */
|
||||
typedef ContentMetaKey ContentMetaInfo;
|
||||
using ContentMetaInfo = ContentMetaKey;
|
||||
|
||||
struct ApplicationContentMetaKey {
|
||||
ContentMetaKey key;
|
||||
|
Loading…
Reference in New Issue
Block a user