From 8179a84458204a5e767446fcf7d10f032a40fd0c Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 19 Nov 2016 05:35:54 +1100 Subject: Introduce u8/u16/u32/u64/s8/s16/s32/s64 * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names --- src/emu/emualloc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/emu/emualloc.cpp') diff --git a/src/emu/emualloc.cpp b/src/emu/emualloc.cpp index 7d87dad0a28..3993121e9bc 100644 --- a/src/emu/emualloc.cpp +++ b/src/emu/emualloc.cpp @@ -23,7 +23,7 @@ // GLOBALS //************************************************************************** -uint64_t resource_pool::s_id = 0; +osd::u64 resource_pool::s_id = 0; @@ -75,7 +75,7 @@ void resource_pool::add(resource_pool_item &item, size_t size, const char *type) // before, so if we don't find it, check 4 bytes ahead item.m_id = ++s_id; if (LOG_ALLOCS) - fprintf(stderr, "#%06d, add %s, %d bytes\n", (uint32_t)item.m_id, type, uint32_t(size)); + fprintf(stderr, "#%06d, add %s, %d bytes\n", u32(item.m_id), type, u32(size)); // find the entry to insert after resource_pool_item *insert_after; @@ -143,7 +143,7 @@ void resource_pool::remove(void *ptr) // delete the object and break if (LOG_ALLOCS) - fprintf(stderr, "#%06d, delete %d bytes\n", (uint32_t)deleteme->m_id, static_cast(deleteme->m_size)); + fprintf(stderr, "#%06d, delete %d bytes\n", u32(deleteme->m_id), u32(deleteme->m_size)); global_free(deleteme); break; } @@ -177,8 +177,8 @@ resource_pool_item *resource_pool::find(void *ptr) bool resource_pool::contains(void *_ptrstart, void *_ptrend) { - uint8_t *ptrstart = reinterpret_cast(_ptrstart); - uint8_t *ptrend = reinterpret_cast(_ptrend); + u8 *ptrstart = reinterpret_cast(_ptrstart); + u8 *ptrend = reinterpret_cast(_ptrend); // search for the item std::lock_guard lock(m_listlock); @@ -186,8 +186,8 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend) resource_pool_item *item = nullptr; for (item = m_ordered_head; item != nullptr; item = item->m_ordered_next) { - uint8_t *objstart = reinterpret_cast(item->m_ptr); - uint8_t *objend = objstart + item->m_size; + u8 *objstart = reinterpret_cast(item->m_ptr); + u8 *objend = objstart + item->m_size; if (ptrstart >= objstart && ptrend <= objend) return true; } -- cgit v1.2.3-70-g09d2