Fix Clang build (nw)

This commit is contained in:
Miodrag Milanovic 2016-04-24 13:24:58 +02:00
parent 89c5e1f681
commit c8c6617862
3 changed files with 19 additions and 19 deletions

View File

@ -23,10 +23,16 @@
#define MCFG_LINE_DISPATCH_FWD_CB(_entry, _count, _devcb) \ #define MCFG_LINE_DISPATCH_FWD_CB(_entry, _count, _devcb) \
devcb = &devcb_line_dispatch_device<_count>::set_fwd_cb(*device, _entry, DEVCB_##_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<int N> class devcb_line_dispatch_device : public device_t { template<int N> class devcb_line_dispatch_device : public device_t {
public: public:
devcb_line_dispatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : 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() { void init_fwd() {
for(auto & elem : fwd_cb) for(auto & elem : fwd_cb)
@ -55,10 +61,4 @@ private:
devcb_write_line *fwd_cb[N]; 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 #endif

View File

@ -227,7 +227,7 @@
- (IBAction)debugToggleBreakpoint:(id)sender { - (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)) if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device))
{ {
offs_t const address = [dasmView selectedAddress]; offs_t const address = [dasmView selectedAddress];
@ -246,7 +246,7 @@
- (IBAction)debugToggleBreakpointEnable:(id)sender { - (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)) if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device))
{ {
device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:[dasmView selectedAddress] device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:[dasmView selectedAddress]
@ -265,7 +265,7 @@
- (IBAction)debugRunToCursor:(id)sender { - (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)) if ([dasmView cursorVisible] && (debug_cpu_get_visible_cpu(*machine) == &device))
{ {
NSString *command = [NSString stringWithFormat:@"go 0x%lX", (unsigned long)[dasmView selectedAddress]]; NSString *command = [NSString stringWithFormat:@"go 0x%lX", (unsigned long)[dasmView selectedAddress]];
@ -481,13 +481,13 @@
SEL const action = [item action]; SEL const action = [item action];
BOOL const inContextMenu = ([item menu] == [dasmView menu]); BOOL const inContextMenu = ([item menu] == [dasmView menu]);
BOOL const haveCursor = [dasmView cursorVisible]; 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; device_debug::breakpoint *breakpoint = nullptr;
if (haveCursor) if (haveCursor)
{ {
breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress] breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress]
forDevice:[dasmView source]->device()]; forDevice:*[dasmView source]->device()];
} }
if (action == @selector(debugToggleBreakpoint:)) if (action == @selector(debugToggleBreakpoint:))

View File

@ -138,7 +138,7 @@
- (IBAction)debugNewMemoryWindow:(id)sender { - (IBAction)debugNewMemoryWindow:(id)sender {
debug_view_disasm_source const *source = [dasmView source]; debug_view_disasm_source const *source = [dasmView source];
[console debugNewMemoryWindowForSpace:&source->space() [console debugNewMemoryWindowForSpace:&source->space()
device:&source->device() device:source->device()
expression:nil]; expression:nil];
} }
@ -146,7 +146,7 @@
- (IBAction)debugNewDisassemblyWindow:(id)sender { - (IBAction)debugNewDisassemblyWindow:(id)sender {
debug_view_disasm_source const *source = [dasmView source]; debug_view_disasm_source const *source = [dasmView source];
[console debugNewDisassemblyWindowForSpace:&source->space() [console debugNewDisassemblyWindowForSpace:&source->space()
device:&source->device() device:source->device()
expression:[dasmView expression]]; expression:[dasmView expression]];
} }
@ -170,7 +170,7 @@
- (IBAction)debugToggleBreakpoint:(id)sender { - (IBAction)debugToggleBreakpoint:(id)sender {
if ([dasmView cursorVisible]) if ([dasmView cursorVisible])
{ {
device_t &device = [dasmView source]->device(); device_t &device = *[dasmView source]->device();
offs_t const address = [dasmView selectedAddress]; offs_t const address = [dasmView selectedAddress];
device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device]; device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device];
@ -197,7 +197,7 @@
- (IBAction)debugToggleBreakpointEnable:(id)sender { - (IBAction)debugToggleBreakpointEnable:(id)sender {
if ([dasmView cursorVisible]) if ([dasmView cursorVisible])
{ {
device_t &device = [dasmView source]->device(); device_t &device = *[dasmView source]->device();
offs_t const address = [dasmView selectedAddress]; offs_t const address = [dasmView selectedAddress];
device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device]; device_debug::breakpoint *bp = [[self class] findBreakpointAtAddress:address forDevice:device];
if (bp != nullptr) if (bp != nullptr)
@ -216,7 +216,7 @@
- (IBAction)debugRunToCursor:(id)sender { - (IBAction)debugRunToCursor:(id)sender {
if ([dasmView cursorVisible]) if ([dasmView cursorVisible])
[dasmView source]->device().debug()->go([dasmView selectedAddress]); [dasmView source]->device()->debug()->go([dasmView selectedAddress]);
} }
@ -235,7 +235,7 @@
if (haveCursor) if (haveCursor)
{ {
breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress] breakpoint = [[self class] findBreakpointAtAddress:[dasmView selectedAddress]
forDevice:[dasmView source]->device()]; forDevice:*[dasmView source]->device()];
} }
if (action == @selector(debugToggleBreakpoint:)) if (action == @selector(debugToggleBreakpoint:))