From 9afad3fd75f833e97274d1bbf15f92a8230f4d94 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Tue, 24 Apr 2012 04:47:27 +0000 Subject: Use a tagged_list for memory_banks. --- src/emu/memory.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/emu/memory.c') diff --git a/src/emu/memory.c b/src/emu/memory.c index 1b861de383d..1ca92ac8a9d 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -2930,13 +2930,12 @@ memory_bank &address_space::bank_find_or_allocate(const char *tag, offs_t addrst throw emu_fatalerror("Unable to allocate bank for RAM/ROM area %X-%X\n", bytestart, byteend); } - // allocate the bank + // if no tag, create a unique one membank = global_alloc(memory_bank(*this, banknum, bytestart, byteend, tag)); - manager().m_banklist.append(*membank); - - // for named banks, add to the map and register for save states - if (tag != NULL) - manager().m_bankmap.add_unique_hash(tag, membank, false); + astring temptag; + if (tag == NULL) + tag = temptag.format("anon_%p", membank); + manager().m_banklist.append(tag, *membank); } // add a reference for this space -- cgit v1.2.3-70-g09d2