diff --git a/tycho/cc/tycho.h b/tycho/cc/tycho.h index 3621e11..7c18f15 100644 --- a/tycho/cc/tycho.h +++ b/tycho/cc/tycho.h @@ -38,6 +38,8 @@ enum class ProjectType Map, }; +using byte = std::uint8_t; + // Interfaces ----------------------------------------------------------------| class ProjectModel @@ -182,9 +184,12 @@ void dbgPrint([[maybe_unused]] char const *fmt, [[maybe_unused]] VA &&...va) #define dbgPrintFunc() dbgPrint("%s", __func__) constexpr -std::uint32_t fourCC(std::byte a, std::byte b, std::byte c, std::byte d) +std::uint32_t fourCC(byte a, byte b, byte c, byte d) { - return (a << 24) | (b << 16) | (c << 8) | d; + return (static_cast(a) << 24) | + (static_cast(b) << 16) | + (static_cast(c) << 8) | + static_cast(d); } extern "C" {