diff --git a/src/dawn/common/SystemUtils.cpp b/src/dawn/common/SystemUtils.cpp index cad35955d6..2e29820728 100644 --- a/src/dawn/common/SystemUtils.cpp +++ b/src/dawn/common/SystemUtils.cpp @@ -158,7 +158,7 @@ std::optional GetModulePath() { } std::array absolutePath; - if (realpath(dlInfo.dli_fname, absolutePath.data()) == NULL) { + if (realpath(dlInfo.dli_fname, absolutePath.data()) == nullptr) { return {}; } return absolutePath.data(); diff --git a/src/dawn/native/d3d12/DeviceD3D12.cpp b/src/dawn/native/d3d12/DeviceD3D12.cpp index 4a6a1bddae..9bfb03e9cf 100644 --- a/src/dawn/native/d3d12/DeviceD3D12.cpp +++ b/src/dawn/native/d3d12/DeviceD3D12.cpp @@ -160,19 +160,19 @@ MaybeError Device::Initialize(const DeviceDescriptor* descriptor) { programDesc.NumArgumentDescs = 1; programDesc.pArgumentDescs = &argumentDesc; - GetD3D12Device()->CreateCommandSignature(&programDesc, NULL, + GetD3D12Device()->CreateCommandSignature(&programDesc, nullptr, IID_PPV_ARGS(&mDispatchIndirectSignature)); argumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW; programDesc.ByteStride = 4 * sizeof(uint32_t); - GetD3D12Device()->CreateCommandSignature(&programDesc, NULL, + GetD3D12Device()->CreateCommandSignature(&programDesc, nullptr, IID_PPV_ARGS(&mDrawIndirectSignature)); argumentDesc.Type = D3D12_INDIRECT_ARGUMENT_TYPE_DRAW_INDEXED; programDesc.ByteStride = 5 * sizeof(uint32_t); - GetD3D12Device()->CreateCommandSignature(&programDesc, NULL, + GetD3D12Device()->CreateCommandSignature(&programDesc, nullptr, IID_PPV_ARGS(&mDrawIndexedIndirectSignature)); DAWN_TRY(DeviceBase::Initialize(Queue::Create(this, &descriptor->defaultQueue))); diff --git a/src/dawn/native/vulkan/QuerySetVk.cpp b/src/dawn/native/vulkan/QuerySetVk.cpp index aa1aac2e7b..3bdb9f7913 100644 --- a/src/dawn/native/vulkan/QuerySetVk.cpp +++ b/src/dawn/native/vulkan/QuerySetVk.cpp @@ -76,7 +76,7 @@ ResultOrError> QuerySet::Create(Device* device, MaybeError QuerySet::Initialize() { VkQueryPoolCreateInfo createInfo; createInfo.sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO; - createInfo.pNext = NULL; + createInfo.pNext = nullptr; createInfo.flags = 0; createInfo.queryType = VulkanQueryType(GetQueryType()); createInfo.queryCount = std::max(GetQueryCount(), uint32_t(1u)); diff --git a/src/tint/utils/io/command_windows.cc b/src/tint/utils/io/command_windows.cc index 8c94e254f4..abe724291c 100644 --- a/src/tint/utils/io/command_windows.cc +++ b/src/tint/utils/io/command_windows.cc @@ -102,18 +102,18 @@ class Pipe { /// Queries whether the file at the given path is an executable or DLL. bool ExecutableExists(const std::string& path) { - auto file = Handle(CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_READONLY, NULL)); + auto file = Handle(CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, + OPEN_EXISTING, FILE_ATTRIBUTE_READONLY, nullptr)); if (!file) { return false; } - auto map = Handle(CreateFileMappingA(file, NULL, PAGE_READONLY, 0, 0, NULL)); + auto map = Handle(CreateFileMappingA(file, nullptr, PAGE_READONLY, 0, 0, nullptr)); if (map == INVALID_HANDLE_VALUE) { return false; } - void* addr_header = MapViewOfFileEx(map, FILE_MAP_READ, 0, 0, 0, NULL); + void* addr_header = MapViewOfFileEx(map, FILE_MAP_READ, 0, 0, 0, nullptr); // Dynamically obtain the address of, and call ImageNtHeader. This is done to avoid tint.exe // needing to statically link Dbghelp.lib.