diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-01 01:25:15 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-01 01:25:15 +0100 |
| commit | cbde52a60605a4fe853d3a3562b2a059e2143e6e (patch) | |
| tree | a32ce689b17bab4b27025d437a51ce855eca043e /lib/nes/sys/nes.cc | |
| parent | 9ca793417149cbaa7b5f4b7797bc929e6e191f28 (diff) | |
avoid copy construction for cartridge
Diffstat (limited to 'lib/nes/sys/nes.cc')
| -rw-r--r-- | lib/nes/sys/nes.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nes/sys/nes.cc b/lib/nes/sys/nes.cc index a711f06..3195826 100644 --- a/lib/nes/sys/nes.cc +++ b/lib/nes/sys/nes.cc @@ -3,8 +3,8 @@ namespace nes::sys { - nes::nes(cartridge const& cartridge, display& display) - : cartridge_{ std::move(cartridge) } + nes::nes(display& display, u8 const* rom_data, u32 rom_length) + : cartridge_{ rom_data, rom_length } , display_{ display } , ppu_{ cpu_, cartridge_, display_ } , cpu_{ ppu_, cartridge_, controller_1_, controller_2_ } |
