Skip to content

Commit d15a8bc

Browse files
committed
Fix arm64 build against current toolchain
1 parent 86faea2 commit d15a8bc

4 files changed

Lines changed: 24 additions & 18 deletions

File tree

Nestopia.xcodeproj/project.pbxproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,7 +2288,10 @@
22882288
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:identifier}";
22892289
PRODUCT_NAME = Nestopia;
22902290
SKIP_INSTALL = YES;
2291-
WARNING_CFLAGS = "-Wno-switch-enum";
2291+
WARNING_CFLAGS = (
2292+
"-Wno-switch-enum",
2293+
"-Wno-c++11-narrowing",
2294+
);
22922295
WRAPPER_EXTENSION = oecoreplugin;
22932296
};
22942297
name = Debug;
@@ -2310,7 +2313,10 @@
23102313
PRODUCT_BUNDLE_IDENTIFIER = "org.openemu.${PRODUCT_NAME:identifier}";
23112314
PRODUCT_NAME = Nestopia;
23122315
SKIP_INSTALL = YES;
2313-
WARNING_CFLAGS = "-Wno-switch-enum";
2316+
WARNING_CFLAGS = (
2317+
"-Wno-switch-enum",
2318+
"-Wno-c++11-narrowing",
2319+
);
23142320
WRAPPER_EXTENSION = oecoreplugin;
23152321
};
23162322
name = Release;

core/NstPpu.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,17 @@ namespace Nes
312312
{
313313
const byte data[11] =
314314
{
315-
static_cast<byte>(regs.ctrl[0]),
316-
static_cast<byte>(regs.ctrl[1]),
317-
static_cast<byte>(regs.status),
318-
static_cast<byte>(scroll.address & 0xFF),
319-
static_cast<byte>(scroll.address >> 8),
320-
static_cast<byte>(scroll.latch & 0xFF),
321-
static_cast<byte>(scroll.latch >> 8),
322-
static_cast<byte>(scroll.xFine | scroll.toggle << 3),
323-
static_cast<byte>(regs.oam),
324-
static_cast<byte>(io.buffer),
325-
static_cast<byte>(io.latch)
315+
byte( regs.ctrl[0] ),
316+
byte( regs.ctrl[1] ),
317+
byte( regs.status ),
318+
byte( scroll.address & 0xFF ),
319+
byte( scroll.address >> 8 ),
320+
byte( scroll.latch & 0xFF ),
321+
byte( scroll.latch >> 8 ),
322+
byte( scroll.xFine | scroll.toggle << 3 ),
323+
byte( regs.oam ),
324+
byte( io.buffer ),
325+
byte( io.latch )
326326
};
327327

328328
state.Begin( AsciiId<'R','E','G'>::V ).Write( data ).End();

core/input/NstInpTurboFile.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ namespace Nes
6565

6666
const byte data[3] =
6767
{
68-
static_cast<byte>(pos & 0xFF),
69-
static_cast<byte>(pos >> 8),
70-
static_cast<byte>(count | (old << 1) | (out << 2))
68+
byte( pos & 0xFF ),
69+
byte( pos >> 8 ),
70+
byte( count | (old << 1) | (out << 2) )
7171
};
7272

7373
saver.Begin( AsciiId<'R','E','G'>::V ).Write( data ).End();

core/input/NstInpZapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ namespace Nes
137137
{
138138
const byte data[2] =
139139
{
140-
static_cast<byte>(arcade ? shifter ? 0x1 : 0x3 : 0x0),
141-
static_cast<byte>(arcade ? stream : 0x00)
140+
byte( arcade ? shifter ? 0x1 : 0x3 : 0x0 ),
141+
byte( arcade ? stream : 0x00 )
142142
};
143143

144144
saver.Begin( AsciiId<'Z','P'>::R(0,0,id) ).Write( data ).End();

0 commit comments

Comments
 (0)