From 8a3be3b67f34c3ae116fe5d67e857f0d5e8a0b75 Mon Sep 17 00:00:00 2001 From: William Miles Date: Thu, 27 Oct 2022 15:47:41 +1100 Subject: [PATCH] Moved fourcc_from_cstr back into esx_reader.hpp. Not entirely sure where it should live. --- Navmesher/esx_reader.hpp | 7 +++++++ Navmesher/esx_reader_lut.cpp | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Navmesher/esx_reader.hpp b/Navmesher/esx_reader.hpp index 245848a..f845dc0 100644 --- a/Navmesher/esx_reader.hpp +++ b/Navmesher/esx_reader.hpp @@ -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(temp); +} + } #endif // ESX_READER_HPP diff --git a/Navmesher/esx_reader_lut.cpp b/Navmesher/esx_reader_lut.cpp index 1b84bdc..60dcd08 100644 --- a/Navmesher/esx_reader_lut.cpp +++ b/Navmesher/esx_reader_lut.cpp @@ -15,13 +15,6 @@ static constexpr std::pair 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(temp); -} - static constexpr std::pair record_type_fourcc_map_builtin[] { {RecordType::AACT, fourcc_from_cstr("AACT")}, {RecordType::ACHR, fourcc_from_cstr("ACHR")},