diff options
| author | 2015-12-04 07:06:18 +0100 | |
|---|---|---|
| committer | 2015-12-04 07:06:18 +0100 | |
| commit | 5a2f80dcde2e76356bf568f1e2d71b054a7db45b (patch) | |
| tree | 31e8369980a2e4548223f529c31e8ca6ade5ce20 /src/osd/modules/debugger/win | |
| parent | 41681c1703244abe68cbcf3096ca259bd061cc08 (diff) | |
clang-modernize part 5
Diffstat (limited to 'src/osd/modules/debugger/win')
| -rw-r--r-- | src/osd/modules/debugger/win/debugbaseinfo.cpp | 4 | ||||
| -rw-r--r-- | src/osd/modules/debugger/win/debugwininfo.h | 2 | ||||
| -rw-r--r-- | src/osd/modules/debugger/win/disasmbasewininfo.cpp | 16 | ||||
| -rw-r--r-- | src/osd/modules/debugger/win/logwininfo.cpp | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/osd/modules/debugger/win/debugbaseinfo.cpp b/src/osd/modules/debugger/win/debugbaseinfo.cpp index 66824b9f029..9f53899affd 100644 --- a/src/osd/modules/debugger/win/debugbaseinfo.cpp +++ b/src/osd/modules/debugger/win/debugbaseinfo.cpp @@ -25,7 +25,7 @@ void debugbase_info::smart_set_window_bounds(HWND wnd, HWND parent, RECT const & // first get the current bounds, relative to the parent GetWindowRect(wnd, &curbounds); - if (parent != NULL) + if (parent != nullptr) { RECT parentbounds; GetWindowRect(parent, &parentbounds); @@ -44,7 +44,7 @@ void debugbase_info::smart_set_window_bounds(HWND wnd, HWND parent, RECT const & // if we need to, reposition the window if (flags != (SWP_NOMOVE | SWP_NOSIZE)) - SetWindowPos(wnd, NULL, + SetWindowPos(wnd, nullptr, bounds.left, bounds.top, bounds.right - bounds.left, bounds.bottom - bounds.top, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | flags); diff --git a/src/osd/modules/debugger/win/debugwininfo.h b/src/osd/modules/debugger/win/debugwininfo.h index 78c088a5eef..08e08d79de9 100644 --- a/src/osd/modules/debugger/win/debugwininfo.h +++ b/src/osd/modules/debugger/win/debugwininfo.h @@ -24,7 +24,7 @@ public: debugwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler); virtual ~debugwin_info(); - bool is_valid() const { return m_wnd != NULL; } + bool is_valid() const { return m_wnd != nullptr; } debugwin_info *next() const { return m_next; } void set_ignore_char_lparam(LPARAM value) { m_ignore_char_lparam = value >> 16; } diff --git a/src/osd/modules/debugger/win/disasmbasewininfo.cpp b/src/osd/modules/debugger/win/disasmbasewininfo.cpp index 783cc8d75fa..f7f516ca24c 100644 --- a/src/osd/modules/debugger/win/disasmbasewininfo.cpp +++ b/src/osd/modules/debugger/win/disasmbasewininfo.cpp @@ -25,7 +25,7 @@ disasmbasewin_info::disasmbasewin_info(debugger_windows_interface &debugger, boo return; m_views[0].reset(global_alloc(disasmview_info(debugger, *this, window()))); - if ((m_views[0] == NULL) || !m_views[0]->is_valid()) + if ((m_views[0] == nullptr) || !m_views[0]->is_valid()) { m_views[0].reset(); return; @@ -115,10 +115,10 @@ void disasmbasewin_info::update_menu() // first find an existing breakpoint at this address device_debug::breakpoint *bp = debug->breakpoint_first(); - while ((bp != NULL) && (bp->address() != address)) + while ((bp != nullptr) && (bp->address() != address)) bp = bp->next(); - if (bp == NULL) + if (bp == nullptr) { ModifyMenu(menu, ID_TOGGLE_BREAKPOINT, MF_BYCOMMAND, ID_TOGGLE_BREAKPOINT, TEXT("Set breakpoint at cursor\tF9")); ModifyMenu(menu, ID_DISABLE_BREAKPOINT, MF_BYCOMMAND, ID_DISABLE_BREAKPOINT, TEXT("Disable breakpoint at cursor\tShift+F9")); @@ -131,7 +131,7 @@ void disasmbasewin_info::update_menu() else ModifyMenu(menu, ID_DISABLE_BREAKPOINT, MF_BYCOMMAND, ID_DISABLE_BREAKPOINT, TEXT("Enable breakpoint at cursor\tShift+F9")); } - bool const available = (bp != NULL) && (!is_main_console() || dasmview->source_is_visible_cpu()); + bool const available = (bp != nullptr) && (!is_main_console() || dasmview->source_is_visible_cpu()); EnableMenuItem(menu, ID_DISABLE_BREAKPOINT, MF_BYCOMMAND | (available ? MF_ENABLED : MF_GRAYED)); } else @@ -168,7 +168,7 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam) INT32 bpindex = -1; // first find an existing breakpoint at this address - for (device_debug::breakpoint *bp = debug->breakpoint_first(); bp != NULL; bp = bp->next()) + for (device_debug::breakpoint *bp = debug->breakpoint_first(); bp != nullptr; bp = bp->next()) { if (address == bp->address()) { @@ -182,7 +182,7 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam) { if (bpindex == -1) { - bpindex = debug->breakpoint_set(address, NULL, NULL); + bpindex = debug->breakpoint_set(address, nullptr, nullptr); debug_console_printf(machine(), "Breakpoint %X set\n", bpindex); } else @@ -213,11 +213,11 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam) // first find an existing breakpoint at this address device_debug::breakpoint *bp = debug->breakpoint_first(); - while ((bp != NULL) && (bp->address() != address)) + while ((bp != nullptr) && (bp->address() != address)) bp = bp->next(); // if it doesn't exist, add a new one - if (bp != NULL) + if (bp != nullptr) { if (!is_main_console()) { diff --git a/src/osd/modules/debugger/win/logwininfo.cpp b/src/osd/modules/debugger/win/logwininfo.cpp index 6610e8a296f..2f631e199d3 100644 --- a/src/osd/modules/debugger/win/logwininfo.cpp +++ b/src/osd/modules/debugger/win/logwininfo.cpp @@ -12,13 +12,13 @@ logwin_info::logwin_info(debugger_windows_interface &debugger) : - debugwin_info(debugger, false, std::string("Errorlog: ").append(debugger.machine().system().description).append(" [").append(debugger.machine().system().name).append("]").c_str(), NULL) + debugwin_info(debugger, false, std::string("Errorlog: ").append(debugger.machine().system().description).append(" [").append(debugger.machine().system().name).append("]").c_str(), nullptr) { if (!window()) return; m_views[0].reset(global_alloc(debugview_info(debugger, *this, window(), DVT_LOG))); - if ((m_views[0] == NULL) || !m_views[0]->is_valid()) + if ((m_views[0] == nullptr) || !m_views[0]->is_valid()) { m_views[0].reset(); return; |
