From 37e5d22fe4480c9f0a39388b0865cb67cd8afee4 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Wed, 9 Nov 2016 15:15:42 +0100 Subject: [PATCH] addrmap: Simplify constructor, thanks Micko [O. Galibert] --- src/emu/addrmap.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index 8715d92f1eb..d4140dbbe22 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -365,24 +365,7 @@ address_map::address_map(const address_space &space, offs_t start, offs_t end, i m_unmapval(space.unmap()), m_globalmask(space.bytemask()) { - address_map_entry *e; - switch(m_databits) { - case 8: - e = add(start, end); - break; - case 16: - e = add(start, end); - break; - case 32: - e = add(start, end); - break; - case 64: - e = add(start, end); - break; - default: - throw emu_fatalerror("Trying to dynamically map a device on a space with a corrupt databits width"); - } - e->set_submap(DEVICE_SELF, submap_delegate, bits, unitmask); + add(start, end)->set_submap(DEVICE_SELF, submap_delegate, bits, unitmask); }