From c8c661786227e1775105e3b92cccff2c2c984936 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 24 Apr 2016 13:24:58 +0200 Subject: [PATCH] Fix Clang build (nw) --- src/emu/dispatch.h | 16 ++++++++-------- src/osd/modules/debugger/osx/debugconsole.mm | 10 +++++----- .../modules/debugger/osx/disassemblyviewer.mm | 12 ++++++------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/emu/dispatch.h b/src/emu/dispatch.h index e1d2c510822..fae34197100 100644 --- a/src/emu/dispatch.h +++ b/src/emu/dispatch.h @@ -23,11 +23,17 @@ #define MCFG_LINE_DISPATCH_FWD_CB(_entry, _count, _devcb) \ devcb = &devcb_line_dispatch_device<_count>::set_fwd_cb(*device, _entry, DEVCB_##_devcb); +extern const device_type DEVCB_LINE_DISPATCH_2; +extern const device_type DEVCB_LINE_DISPATCH_3; +extern const device_type DEVCB_LINE_DISPATCH_4; +extern const device_type DEVCB_LINE_DISPATCH_5; +extern const device_type DEVCB_LINE_DISPATCH_6; + template class devcb_line_dispatch_device : public device_t { public: devcb_line_dispatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, tag, owner, clock) { } - + device_t(mconfig, DEVCB_LINE_DISPATCH_2, "DEVCB_LINE_DISPATCH_2", tag, owner, clock, "devcb_line_dispatch_2", __FILE__) { } + void init_fwd() { for(auto & elem : fwd_cb) elem = new devcb_write_line(*this); @@ -55,10 +61,4 @@ private: devcb_write_line *fwd_cb[N]; }; -extern const device_type DEVCB_LINE_DISPATCH_2; -extern const device_type DEVCB_LINE_DISPATCH_3; -extern const device_type DEVCB_LINE_DISPATCH_4; -extern const device_type DEVCB_LINE_DISPATCH_5; -extern const device_type DEVCB_LINE_DISPATCH_6; - #endif diff --git a/src/osd/modules/debugger/osx/debugconsole.mm b/src/osd/modules/debugger/osx/debugconsole.mm index dc86bd6f53e..30ee1e8eab2 100644 --- a/src/osd/modules/debugger/osx/debugconsole.mm +++ b/src/osd/modules/debugger/osx/debugconsole.mm @@ -227,7 +227,7 @@ - (IBAction)debugToggleBreakpoint:(id)sender { - device_t &device = [dasmView source]->device(); + device_t &device = *[dasmView source]->device(); if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device)) { offs_t const address = [dasmView selectedAddress]; @@ -246,7 +246,7 @@ - (IBAction)debugToggleBreakpointEnable:(id)sender { - device_t &device = [dasmView source]->device(); + device_t &device = *[dasmView source]->device(); if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device)) { device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:[dasmView selectedAddress] @@ -265,7 +265,7 @@ - (IBAction)debugRunToCursor:(id)sender { - device_t &device = [dasmView source]->device(); + device_t &device = *[dasmView source]->device(); if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device)) { NSString *command = [NSString stringWithFormat:@"go 0x%lX", (unsigned long)[dasmView selectedAddress]]; @@ -481,13 +481,13 @@ SEL const action = [item action]; BOOL const inContextMenu = ([item menu] == [dasmView menu]); BOOL const haveCursor = [dasmView cursorVisible]; - BOOL const isCurrent = (debug_cpu_get_visible_cpu(*machine) == &[dasmView source]->device()); + BOOL const isCurrent = (debug_cpu_get_visible_cpu(*machine) == [dasmView source]->device()); device_debug::breakpoint *breakpoint = nullptr; if (haveCursor) { breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress] - forDevice:[dasmView source]->device()]; + forDevice:*[dasmView source]->device()]; } if (action == @selector(debugToggleBreakpoint:)) diff --git a/src/osd/modules/debugger/osx/disassemblyviewer.mm b/src/osd/modules/debugger/osx/disassemblyviewer.mm index 10e6c6d2cac..1254dd8a707 100644 --- a/src/osd/modules/debugger/osx/disassemblyviewer.mm +++ b/src/osd/modules/debugger/osx/disassemblyviewer.mm @@ -138,7 +138,7 @@ - (IBAction)debugNewMemoryWindow:(id)sender { debug_view_disasm_source const *source = [dasmView source]; [console debugNewMemoryWindowForSpace:&source->space() - device:&source->device() + device:source->device() expression:nil]; } @@ -146,7 +146,7 @@ - (IBAction)debugNewDisassemblyWindow:(id)sender { debug_view_disasm_source const *source = [dasmView source]; [console debugNewDisassemblyWindowForSpace:&source->space() - device:&source->device() + device:source->device() expression:[dasmView expression]]; } @@ -170,7 +170,7 @@ - (IBAction)debugToggleBreakpoint:(id)sender { if ([dasmView cursorVisible]) { - device_t &device = [dasmView source]->device(); + device_t &device = *[dasmView source]->device(); offs_t const address = [dasmView selectedAddress]; device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device]; @@ -197,7 +197,7 @@ - (IBAction)debugToggleBreakpointEnable:(id)sender { if ([dasmView cursorVisible]) { - device_t &device = [dasmView source]->device(); + device_t &device = *[dasmView source]->device(); offs_t const address = [dasmView selectedAddress]; device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device]; if (bp != nullptr) @@ -216,7 +216,7 @@ - (IBAction)debugRunToCursor:(id)sender { if ([dasmView cursorVisible]) - [dasmView source]->device().debug()->go([dasmView selectedAddress]); + [dasmView source]->device()->debug()->go([dasmView selectedAddress]); } @@ -235,7 +235,7 @@ if (haveCursor) { breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress] - forDevice:[dasmView source]->device()]; + forDevice:*[dasmView source]->device()]; } if (action == @selector(debugToggleBreakpoint:))