From 30802a447f649430258504721f1d569a305b22ef Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 13 Jun 2022 03:55:50 -0400 Subject: [PATCH] More GCC 9 fixes --- Runtime/Graphics/GX.hpp | 2 +- aurora/lib/gfx/gx.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Graphics/GX.hpp b/Runtime/Graphics/GX.hpp index 27bc89af4..a6668c869 100644 --- a/Runtime/Graphics/GX.hpp +++ b/Runtime/Graphics/GX.hpp @@ -642,7 +642,7 @@ enum LightID : u32 { MAX_LIGHT = 0x100, LIGHT_NULL = 0x000, }; -constexpr u8 MaxLights = std::bit_width>(MAX_LIGHT) - 1; +constexpr u8 MaxLights = 8; using LightMask = std::bitset; enum FogType { diff --git a/aurora/lib/gfx/gx.hpp b/aurora/lib/gfx/gx.hpp index cb827afae..56f0c27db 100644 --- a/aurora/lib/gfx/gx.hpp +++ b/aurora/lib/gfx/gx.hpp @@ -143,7 +143,7 @@ struct TevSwap { GX::TevColorChan alpha = GX::CH_ALPHA; bool operator==(const TevSwap& rhs) const { return memcmp(this, &rhs, sizeof(*this)) == 0; } - explicit operator bool() const { return *this != TevSwap{}; } + explicit operator bool() const { return !(*this == TevSwap{}); } }; static_assert(std::has_unique_object_representations_v); struct AlphaCompare {