From 9ca793417149cbaa7b5f4b7797bc929e6e191f28 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Sat, 1 Feb 2025 01:14:03 +0100 Subject: use custom integer types --- lib/nes/common/rgb.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/nes/common/rgb.hh') diff --git a/lib/nes/common/rgb.hh b/lib/nes/common/rgb.hh index d62c70c..0b8ec1c 100644 --- a/lib/nes/common/rgb.hh +++ b/lib/nes/common/rgb.hh @@ -1,6 +1,6 @@ #pragma once -#include +#include "nes/common/types.hh" namespace nes { @@ -10,14 +10,14 @@ namespace nes public: explicit rgb() = default; - explicit rgb(std::uint8_t const r, std::uint8_t const g, std::uint8_t const b) + explicit rgb(u8 const r, u8 const g, u8 const b) : r{ r } , g{ g } , b{ b } { } - static auto from_hex(std::uint32_t const hex) -> rgb + static auto from_hex(u32 const hex) -> rgb { auto res = rgb{}; res.r = (hex & 0x00FF0000) >> 16; @@ -26,8 +26,8 @@ namespace nes return res; } - std::uint8_t r{ 0 }; - std::uint8_t g{ 0 }; - std::uint8_t b{ 0 }; + u8 r{ 0 }; + u8 g{ 0 }; + u8 b{ 0 }; }; } // namespace nes \ No newline at end of file -- cgit v1.3.1