From 0c56ac848dd0eba359500d444ecbb51f215ff5b9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Dec 2015 07:02:45 +0100 Subject: clang-modernize part 3 --- src/devices/cpu/uml.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/devices/cpu/uml.cpp') diff --git a/src/devices/cpu/uml.cpp b/src/devices/cpu/uml.cpp index f7b0584431f..e01b34cdcb6 100644 --- a/src/devices/cpu/uml.cpp +++ b/src/devices/cpu/uml.cpp @@ -256,12 +256,12 @@ inline UINT64 rol64(UINT64 source, UINT8 count) uml::code_handle::code_handle(drcuml_state &drcuml, const char *name) : m_code(reinterpret_cast(drcuml.cache().alloc_near(sizeof(drccodeptr)))), m_string(name), - m_next(NULL), + m_next(nullptr), m_drcuml(drcuml) { - if (m_code == NULL) + if (m_code == nullptr) throw std::bad_alloc(); - *m_code = NULL; + *m_code = nullptr; } @@ -271,7 +271,7 @@ uml::code_handle::code_handle(drcuml_state &drcuml, const char *name) void uml::code_handle::set_codeptr(drccodeptr code) { - assert(*m_code == NULL); + assert(*m_code == nullptr); assert_in_cache(m_drcuml.cache(), code); *m_code = code; } @@ -972,7 +972,7 @@ const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml) UINT32 symoffset; // symbol - if (drcuml != NULL && (symbol = drcuml->symbol_find(param.memory(), &symoffset)) != NULL) + if (drcuml != nullptr && (symbol = drcuml->symbol_find(param.memory(), &symoffset)) != nullptr) { if (symoffset == 0) strcatprintf(buffer, "[%s]", symbol); @@ -981,7 +981,7 @@ const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml) } // cache memory - else if (drcuml != NULL && drcuml->cache().contains_pointer(param.memory())) + else if (drcuml != nullptr && drcuml->cache().contains_pointer(param.memory())) strcatprintf(buffer, "[+$%X]", (UINT32)(FPTR)((drccodeptr)param.memory() - drcuml->cache().near())); // general memory -- cgit v1.2.3-70-g09d2