From 9c45e9c7df1efa5bc1c8e73b6eaef4726b828d3e Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Tue, 4 Feb 2025 19:59:47 +0100 Subject: add span type --- lib/nes/sys/ppu.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/nes/sys/ppu.cc') diff --git a/lib/nes/sys/ppu.cc b/lib/nes/sys/ppu.cc index c9e6f11..2419030 100644 --- a/lib/nes/sys/ppu.cc +++ b/lib/nes/sys/ppu.cc @@ -239,7 +239,7 @@ namespace nes::sys sprite_count_ = 0; for (auto i = u32{ 0 }; i < sprite_max_count; ++i) { - auto const s = sprite{ &oam_[i * 4] }; + auto const s = sprite{ span{ oam_ }.subspan<4>(i * 4) }; auto const row = static_cast(scanline_) - static_cast(s.get_y()); if (row < 0 || static_cast(row) >= height) { continue; } -- cgit v1.3.1