From a8fc40d4badfd73917171b081f57b88b80bd1e69 Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Thu, 23 Jan 2025 22:38:06 +0100 Subject: fix compiler warnings --- lib/nes/cartridge.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/nes/cartridge.cc') diff --git a/lib/nes/cartridge.cc b/lib/nes/cartridge.cc index 861dc13..d4ade23 100644 --- a/lib/nes/cartridge.cc +++ b/lib/nes/cartridge.cc @@ -25,7 +25,7 @@ namespace nes auto const chr_rom_banks = bytes[5]; auto const control_1 = bytes[6]; auto const control_2 = bytes[7]; - auto const ram_banks = (bytes[8] != 0) ? bytes[8] : 1; + auto const ram_banks = (bytes[8] != 0) ? bytes[8] : 1u; auto const has_trainer = (control_1 & 0b00000100) != 0; res.mapper_number_ = @@ -62,8 +62,8 @@ namespace nes stream.seekg(0, std::ios::end); auto const length = stream.tellg(); stream.seekg(0, std::ios::beg); - auto data = std::vector(length); - stream.read(reinterpret_cast(data.data()), data.size()); + auto data = std::vector(static_cast(length)); + stream.read(reinterpret_cast(data.data()), length); return from_data(data.data(), data.size()); } -- cgit v1.3.1