diff --git a/src/nostalgia/core/color.hpp b/src/nostalgia/core/color.hpp index 3f7db244..3e003120 100644 --- a/src/nostalgia/core/color.hpp +++ b/src/nostalgia/core/color.hpp @@ -92,7 +92,7 @@ constexpr uint8_t blue32(Color32 c) noexcept { [[nodiscard]] -constexpr Color16 color16(uint8_t r, uint8_t g, uint8_t b) { +constexpr Color16 color16(uint8_t r, uint8_t g, uint8_t b) noexcept { return r | (g << 5) | (b << 10); } diff --git a/src/nostalgia/core/context.hpp b/src/nostalgia/core/context.hpp index 6ad84305..bc36ca15 100644 --- a/src/nostalgia/core/context.hpp +++ b/src/nostalgia/core/context.hpp @@ -26,6 +26,7 @@ class Context { } template + [[nodiscard]] constexpr T *windowerData() noexcept { return static_cast(m_windowerData); } @@ -35,6 +36,7 @@ class Context { } template + [[nodiscard]] constexpr T *rendererData() noexcept { return static_cast(m_rendererData); } diff --git a/src/nostalgia/core/gba/gfx.cpp b/src/nostalgia/core/gba/gfx.cpp index c9ae74fb..91698ee6 100644 --- a/src/nostalgia/core/gba/gfx.cpp +++ b/src/nostalgia/core/gba/gfx.cpp @@ -44,7 +44,7 @@ struct GbaTileMapTarget { }; template -ox::Error modelRead(T *io, GbaPaletteTarget *t) { +ox::Error modelRead(T *io, GbaPaletteTarget *t) noexcept { io->template setTypeInfo(); const auto colorHandler = [t](std::size_t i, Color16 *c) { t->palette[i] = *c; @@ -54,7 +54,7 @@ ox::Error modelRead(T *io, GbaPaletteTarget *t) { } template -ox::Error modelRead(T *io, GbaTileMapTarget *t) { +ox::Error modelRead(T *io, GbaTileMapTarget *t) noexcept { io->template setTypeInfo(); uint8_t bpp; int dummy; diff --git a/src/nostalgia/core/gfx.hpp b/src/nostalgia/core/gfx.hpp index 46c07c80..9f2ea706 100644 --- a/src/nostalgia/core/gfx.hpp +++ b/src/nostalgia/core/gfx.hpp @@ -44,14 +44,14 @@ struct NostalgiaGraphic { }; template -constexpr ox::Error model(T *io, NostalgiaPalette *pal) { +constexpr ox::Error model(T *io, NostalgiaPalette *pal) noexcept { io->template setTypeInfo(); oxReturnError(io->field("colors", &pal->colors)); return OxError(0); } template -constexpr ox::Error model(T *io, NostalgiaGraphic *ng) { +constexpr ox::Error model(T *io, NostalgiaGraphic *ng) noexcept { io->template setTypeInfo(); oxReturnError(io->field("bpp", &ng->bpp)); oxReturnError(io->field("rows", &ng->rows));