diff --git a/src/shader_recompiler/frontend/ir/attribute.h b/src/shader_recompiler/frontend/ir/attribute.h index 01d892791e..64d3bc2e52 100644 --- a/src/shader_recompiler/frontend/ir/attribute.h +++ b/src/shader_recompiler/frontend/ir/attribute.h @@ -235,23 +235,23 @@ enum class Attribute : u64 { constexpr size_t NUM_GENERICS = 32; constexpr size_t NUM_FIXEDFNCTEXTURE = 10; -[[nodiscard]] bool IsGeneric(Attribute attribute) noexcept { +[[nodiscard]] inline bool IsGeneric(Attribute attribute) noexcept { return attribute >= Attribute::Generic0X && attribute <= Attribute::Generic31X; } -[[nodiscard]] u32 GenericAttributeIndex(Attribute attribute) { +[[nodiscard]] inline u32 GenericAttributeIndex(Attribute attribute) { if (!IsGeneric(attribute)) throw InvalidArgument("Attribute is not generic {}", attribute); return (u32(attribute) - u32(Attribute::Generic0X)) / 4u; } -[[nodiscard]] u32 GenericAttributeElement(Attribute attribute) { +[[nodiscard]] inline u32 GenericAttributeElement(Attribute attribute) { if (!IsGeneric(attribute)) throw InvalidArgument("Attribute is not generic {}", attribute); return u32(attribute) % 4; } -[[nodiscard]] std::string NameOf(Attribute attribute) { +[[nodiscard]] inline std::string NameOf(Attribute attribute) { switch (attribute) { #define SRIR_ATTRIBUTE_ELEM(n, v) case Attribute::n: return #n; SRIR_ATTRIBUTE_LIST diff --git a/src/shader_recompiler/frontend/ir/flow_test.h b/src/shader_recompiler/frontend/ir/flow_test.h index d6970c246b..2e7996ec88 100644 --- a/src/shader_recompiler/frontend/ir/flow_test.h +++ b/src/shader_recompiler/frontend/ir/flow_test.h @@ -52,7 +52,7 @@ enum class FlowTest : u64 { #undef SRIR_FLOW_TEST_ELEM }; -[[nodiscard]] std::string NameOf(FlowTest flow_test) { +[[nodiscard]] inline std::string NameOf(FlowTest flow_test) { switch (flow_test) { #define SRIR_FLOW_TEST_ELEM(n) case FlowTest::n: return #n; SRIR_FLOW_TEST_LIST