diff options
author | 2016-11-19 05:35:54 +1100 | |
---|---|---|
committer | 2016-11-19 05:38:48 +1100 | |
commit | 8179a84458204a5e767446fcf7d10f032a40fd0c (patch) | |
tree | 16105e1667f811dcb24dbf0fc255166cb06df5c2 /src/emu/emualloc.cpp | |
parent | 1b489fe83034072149fb0637b20c7ba57dc72a7a (diff) |
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
Diffstat (limited to 'src/emu/emualloc.cpp')
-rw-r--r-- | src/emu/emualloc.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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<uint32_t>(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<uint8_t *>(_ptrstart); - uint8_t *ptrend = reinterpret_cast<uint8_t *>(_ptrend); + u8 *ptrstart = reinterpret_cast<u8 *>(_ptrstart); + u8 *ptrend = reinterpret_cast<u8 *>(_ptrend); // search for the item std::lock_guard<std::mutex> 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<uint8_t *>(item->m_ptr); - uint8_t *objend = objstart + item->m_size; + u8 *objstart = reinterpret_cast<u8 *>(item->m_ptr); + u8 *objend = objstart + item->m_size; if (ptrstart >= objstart && ptrend <= objend) return true; } |