mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-10 14:14:21 +00:00
don't wrongly try to use constexpr on non constexpr functions
This commit is contained in:
parent
ab7b9eda0e
commit
92b4d399d1
1 changed files with 5 additions and 5 deletions
|
@ -28,29 +28,29 @@ namespace tin::install
|
|||
|
||||
static_assert(sizeof(HFS0BaseHeader) == 0x10, "HFS0BaseHeader must be 0x10");
|
||||
|
||||
NX_CONSTEXPR const HFS0FileEntry *hfs0GetFileEntry(const HFS0BaseHeader *header, u32 i)
|
||||
NX_INLINE const HFS0FileEntry *hfs0GetFileEntry(const HFS0BaseHeader *header, u32 i)
|
||||
{
|
||||
if (i >= header->numFiles)
|
||||
return NULL;
|
||||
return (const HFS0FileEntry*)(header + 0x1 + i * 0x4);
|
||||
}
|
||||
|
||||
NX_CONSTEXPR const char *hfs0GetStringTable(const HFS0BaseHeader *header)
|
||||
NX_INLINE const char *hfs0GetStringTable(const HFS0BaseHeader *header)
|
||||
{
|
||||
return (const char*)(header + 0x1 + header->numFiles * 0x4);
|
||||
}
|
||||
|
||||
NX_CONSTEXPR u64 hfs0GetHeaderSize(const HFS0BaseHeader *header)
|
||||
NX_INLINE u64 hfs0GetHeaderSize(const HFS0BaseHeader *header)
|
||||
{
|
||||
return 0x1 + header->numFiles * 0x4 + header->stringTableSize;
|
||||
}
|
||||
|
||||
NX_CONSTEXPR const char *hfs0GetFileName(const HFS0BaseHeader *header, u32 i)
|
||||
NX_INLINE const char *hfs0GetFileName(const HFS0BaseHeader *header, u32 i)
|
||||
{
|
||||
return hfs0GetStringTable(header) + hfs0GetFileEntry(header, i)->stringTableOffset;
|
||||
}
|
||||
|
||||
NX_CONSTEXPR const char *hfs0GetFileName(const HFS0BaseHeader *header, const HFS0FileEntry *entry)
|
||||
NX_INLINE const char *hfs0GetFileName(const HFS0BaseHeader *header, const HFS0FileEntry *entry)
|
||||
{
|
||||
return hfs0GetStringTable(header) + entry->stringTableOffset;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue