Fix clang build [-Wc++11-narrowing] (nw)

This also adds an explicit type to the enum, so MSVC should be happy with this way as well.
This commit is contained in:
AJR 2019-01-07 19:36:03 -05:00
parent 16dd0b6f55
commit 2a7fbbf7d7
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ bool apridisk_format::load(io_generic *io, uint32_t form_factor, floppy_image *i
uint8_t sector_header[16];
io_generic_read(io, sector_header, file_offset, 16);
int32_t type = pick_integer_le(&sector_header, 0, 4);
uint32_t type = pick_integer_le(&sector_header, 0, 4);
uint16_t compression = pick_integer_le(&sector_header, 4, 2);
uint16_t header_size = pick_integer_le(&sector_header, 6, 2);
uint32_t data_size = pick_integer_le(&sector_header, 8, 4);

View File

@ -33,7 +33,7 @@ private:
static const int APR_HEADER_SIZE = 128;
// sector types
enum
enum : uint32_t
{
APR_DELETED = 0xe31d0000,
APR_SECTOR = 0xe31d0001,