mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-07 10:05:47 +00:00
Merge pull request #3123 from lioncash/null
Core: Replace 0 literals with nullptr
This commit is contained in:
commit
bcee41b65d
6 changed files with 11 additions and 11 deletions
|
@ -153,8 +153,8 @@ bool OpenTAP(HANDLE& adapter, const std::basic_string<TCHAR>& device_guid)
|
|||
{
|
||||
auto const device_path = USERMODEDEVICEDIR + device_guid + TAPSUFFIX;
|
||||
|
||||
adapter = CreateFile(device_path.c_str(), GENERIC_READ | GENERIC_WRITE, 0, 0,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED, 0);
|
||||
adapter = CreateFile(device_path.c_str(), GENERIC_READ | GENERIC_WRITE, 0, nullptr,
|
||||
OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED, nullptr);
|
||||
|
||||
if (adapter == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
|
@ -250,7 +250,7 @@ bool CEXIETHERNET::SendFrame(u8 *frame, u32 size)
|
|||
ZeroMemory(&overlap, sizeof(overlap));
|
||||
|
||||
// WriteFile will always return false because the TAP handle is async
|
||||
WriteFile(mHAdapter, frame, size, NULL, &overlap);
|
||||
WriteFile(mHAdapter, frame, size, nullptr, &overlap);
|
||||
|
||||
DWORD res = GetLastError();
|
||||
if (res != ERROR_IO_PENDING)
|
||||
|
|
|
@ -94,7 +94,7 @@ static void ScanThreadFunc()
|
|||
s_libusb_hotplug_enabled = libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG) != 0;
|
||||
if (s_libusb_hotplug_enabled)
|
||||
{
|
||||
if (libusb_hotplug_register_callback(s_libusb_context, (libusb_hotplug_event)(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT), LIBUSB_HOTPLUG_ENUMERATE, 0x057e, 0x0337, LIBUSB_HOTPLUG_MATCH_ANY, HotplugCallback, NULL, &s_hotplug_handle) != LIBUSB_SUCCESS)
|
||||
if (libusb_hotplug_register_callback(s_libusb_context, (libusb_hotplug_event)(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT), LIBUSB_HOTPLUG_ENUMERATE, 0x057e, 0x0337, LIBUSB_HOTPLUG_MATCH_ANY, HotplugCallback, nullptr, &s_hotplug_handle) != LIBUSB_SUCCESS)
|
||||
s_libusb_hotplug_enabled = false;
|
||||
if (s_libusb_hotplug_enabled)
|
||||
NOTICE_LOG(SERIALINTERFACE, "Using libUSB hotplug detection");
|
||||
|
|
|
@ -540,7 +540,7 @@ bool WiimoteWindows::ConnectInternal()
|
|||
|
||||
if (m_dev_handle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
m_dev_handle = 0;
|
||||
m_dev_handle = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -591,7 +591,7 @@ void WiimoteWindows::DisconnectInternal()
|
|||
return;
|
||||
|
||||
CloseHandle(m_dev_handle);
|
||||
m_dev_handle = 0;
|
||||
m_dev_handle = nullptr;
|
||||
|
||||
#ifdef SHARE_WRITE_WIIMOTES
|
||||
std::lock_guard<std::mutex> lk(g_connected_wiimotes_lock);
|
||||
|
@ -601,7 +601,7 @@ void WiimoteWindows::DisconnectInternal()
|
|||
|
||||
WiimoteWindows::WiimoteWindows(const std::basic_string<TCHAR>& path) : m_devicepath(path)
|
||||
{
|
||||
m_dev_handle = 0;
|
||||
m_dev_handle = nullptr;
|
||||
m_stack = MSBT_STACK_UNKNOWN;
|
||||
|
||||
m_hid_overlap_read = OVERLAPPED();
|
||||
|
@ -620,7 +620,7 @@ WiimoteWindows::~WiimoteWindows()
|
|||
|
||||
bool WiimoteWindows::IsConnected() const
|
||||
{
|
||||
return m_dev_handle != 0;
|
||||
return m_dev_handle != nullptr;
|
||||
}
|
||||
|
||||
// positive = read packet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue