diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 20:08:08 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-06 20:08:08 +0100 |
| commit | c4ab1532769de3196afe10a0b200f631cdc438b4 (patch) | |
| tree | a968fc11f35d988687bebb3f13eadfbf017e2494 | |
| parent | a1fd97365f528ce297a7cba2ee965667bf3ea3f6 (diff) | |
i'm sad
| -rw-r--r-- | lib/nes/app/application.cc | 2 | ||||
| -rw-r--r-- | lib/nes/common/containers/span.hh | 5 | ||||
| -rw-r--r-- | lib/nes/sys/ppu.cc | 2 |
3 files changed, 2 insertions, 7 deletions
diff --git a/lib/nes/app/application.cc b/lib/nes/app/application.cc index ac9f731..4498f98 100644 --- a/lib/nes/app/application.cc +++ b/lib/nes/app/application.cc @@ -151,7 +151,7 @@ namespace nes::app break; } - console_.emplace(display_, span{ buffer, length }); + console_.emplace(display_, span<u8 const>{ buffer, length }); if (console_->get_status() != status::success) { show_error("Unable to load cartridge", console_->get_status()); diff --git a/lib/nes/common/containers/span.hh b/lib/nes/common/containers/span.hh index 17395ca..324d486 100644 --- a/lib/nes/common/containers/span.hh +++ b/lib/nes/common/containers/span.hh @@ -58,11 +58,6 @@ namespace nes static_assert(Length == ActualLength || Length == detail::span_dynamic_length); } - span(span<detail::remove_const_type<T>, Length> const other) - : span{ other.data_, other.length_, {} } - { - } - auto get_data() const -> T* { return data_; } auto get_length() const -> u32 { return length_; } auto is_empty() const -> bool { return length_ == 0; } diff --git a/lib/nes/sys/ppu.cc b/lib/nes/sys/ppu.cc index ce145d5..5b9f5db 100644 --- a/lib/nes/sys/ppu.cc +++ b/lib/nes/sys/ppu.cc @@ -242,7 +242,7 @@ namespace nes::sys sprite_count_ = 0; for (auto i = u32{ 0 }; i < sprite_max_count; ++i) { - auto const s = sprite{ span{ oam_ }.subspan<4>(i * 4) }; + auto const s = sprite{ span<u8 const>{ oam_ }.subspan<4>(i * 4) }; auto const row = static_cast<int>(scanline_) - static_cast<int>(s.get_y()); if (row < 0 || static_cast<u32>(row) >= height) { continue; } |
