From e5a5faa417826a02ba72d0ab2ee446557beb7e46 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 23 Sep 2021 22:53:41 -0400 Subject: [PATCH] Resolves Clang 13 implicit conversion warnings. --- Machines/Atari/2600/Cartridges/Pitfall2.hpp | 2 +- Storage/Disk/DiskImage/Formats/AppleDSK.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Machines/Atari/2600/Cartridges/Pitfall2.hpp b/Machines/Atari/2600/Cartridges/Pitfall2.hpp index daf9ad3ec..3cd2dd557 100644 --- a/Machines/Atari/2600/Cartridges/Pitfall2.hpp +++ b/Machines/Atari/2600/Cartridges/Pitfall2.hpp @@ -105,7 +105,7 @@ class Pitfall2: public BusExtender { int table_position = 0; for(int c = 0; c < 3; c++) { - audio_channel_[c] = (audio_channel_[c] + cycles_to_run_for) % (1 + top_[5 + c]); + audio_channel_[c] = uint8_t((audio_channel_[c] + cycles_to_run_for) % (1 + top_[5 + c])); if((featcher_address_[5 + c] & 0x1000) && ((top_[5 + c] - audio_channel_[c]) > bottom_[5 + c])) { table_position |= 0x4 >> c; } diff --git a/Storage/Disk/DiskImage/Formats/AppleDSK.cpp b/Storage/Disk/DiskImage/Formats/AppleDSK.cpp index ad9044776..699da7ecc 100644 --- a/Storage/Disk/DiskImage/Formats/AppleDSK.cpp +++ b/Storage/Disk/DiskImage/Formats/AppleDSK.cpp @@ -90,7 +90,7 @@ std::shared_ptr AppleDSK::get_track_at_position(Track::Address address) { // Apply inter-track skew; skew is about 40ms between each track; assuming 300RPM that's // 1/5th of a revolution. - const size_t offset_in_fifths = address.position.as_int() % 5; + const size_t offset_in_fifths = size_t(address.position.as_int() % 5); segment.rotate_right(offset_in_fifths * segment.data.size() / 5); return std::make_shared(segment);