diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-04-02 16:13:23 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-06-24 13:42:54 +0200 |
commit | 139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901 (patch) | |
tree | 8d06ede9e14516516a44c5ed710058003088eec2 /win/rfb_win32/MsgWindow.cxx | |
parent | 45198e5235f4b724277665b242cf855a0ff4518b (diff) | |
download | tigervnc-139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901.tar.gz tigervnc-139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901.zip |
Use nullptr in all C++ code
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
Diffstat (limited to 'win/rfb_win32/MsgWindow.cxx')
-rw-r--r-- | win/rfb_win32/MsgWindow.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/win/rfb_win32/MsgWindow.cxx b/win/rfb_win32/MsgWindow.cxx index 251b2762..30c9373e 100644 --- a/win/rfb_win32/MsgWindow.cxx +++ b/win/rfb_win32/MsgWindow.cxx @@ -74,11 +74,11 @@ MsgWindowClass::MsgWindowClass() : classAtom(0) { wndClass.lpfnWndProc = MsgWindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = 0; - wndClass.hInstance = instance = GetModuleHandle(0); - wndClass.hIcon = 0; - wndClass.hCursor = 0; - wndClass.hbrBackground = 0; - wndClass.lpszMenuName = 0; + wndClass.hInstance = instance = GetModuleHandle(nullptr); + wndClass.hIcon = nullptr; + wndClass.hCursor = nullptr; + wndClass.hbrBackground = nullptr; + wndClass.lpszMenuName = nullptr; wndClass.lpszClassName = "rfb::win32::MsgWindowClass"; classAtom = RegisterClass(&wndClass); if (!classAtom) { @@ -98,11 +98,11 @@ static MsgWindowClass baseClass; // -=- MsgWindow // -MsgWindow::MsgWindow(const char* name_) : name(name_), handle(0) { +MsgWindow::MsgWindow(const char* name_) : name(name_), handle(nullptr) { vlog.debug("creating window \"%s\"", name.c_str()); handle = CreateWindow((const char*)(intptr_t)baseClass.classAtom, - name.c_str(), WS_OVERLAPPED, 0, 0, 10, 10, 0, 0, - baseClass.instance, this); + name.c_str(), WS_OVERLAPPED, 0, 0, 10, 10, + nullptr, nullptr, baseClass.instance, this); if (!handle) { throw rdr::SystemException("unable to create WMNotifier window instance", GetLastError()); } |