Moved fourcc_from_cstr back into esx_reader.hpp. Not entirely sure where it should live.
This commit is contained in:
@@ -160,6 +160,13 @@ private:
|
||||
|
||||
[[nodiscard]] Header read_header(std::istream &in);
|
||||
|
||||
// Convert a compatible C string to a FourCC (e.g. "LITR")
|
||||
static consteval FourCC fourcc_from_cstr(const char(&a)[5]) noexcept
|
||||
{
|
||||
char temp[4] = { a[0], a[1], a[2], a[3] };
|
||||
return std::bit_cast<FourCC, char[4]>(temp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // ESX_READER_HPP
|
||||
|
||||
@@ -15,13 +15,6 @@ static constexpr std::pair<GroupType, std::string_view> group_type_name_map_buil
|
||||
{GroupType::CellTemporaryChildren , "Cell Temporary Children" },
|
||||
};
|
||||
|
||||
// Convert a compatible C string to a FourCC (e.g. "LITR")
|
||||
static consteval FourCC fourcc_from_cstr(const char(&a)[5]) noexcept
|
||||
{
|
||||
char temp[4] = { a[0], a[1], a[2], a[3] };
|
||||
return std::bit_cast<FourCC, char[4]>(temp);
|
||||
}
|
||||
|
||||
static constexpr std::pair<RecordType, FourCC> record_type_fourcc_map_builtin[] {
|
||||
{RecordType::AACT, fourcc_from_cstr("AACT")},
|
||||
{RecordType::ACHR, fourcc_from_cstr("ACHR")},
|
||||
|
||||
Reference in New Issue
Block a user