Replace NULL with nullptr
This patch replaces NULL with nullptr as nullptr is preferred as null pointers in Chromium coding style. Bug: None Change-Id: Ie6ab9d606d791bad2c50001815062c22e9ec0d25 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102102 Reviewed-by: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
a48e46f3a4
commit
060137a712
|
@ -158,7 +158,7 @@ std::optional<std::string> GetModulePath() {
|
|||
}
|
||||
|
||||
std::array<char, PATH_MAX> absolutePath;
|
||||
if (realpath(dlInfo.dli_fname, absolutePath.data()) == NULL) {
|
||||
if (realpath(dlInfo.dli_fname, absolutePath.data()) == nullptr) {
|
||||
return {};
|
||||
}
|
||||
return absolutePath.data();
|
||||
|
|
|
@ -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)));
|
||||
|
|
|
@ -76,7 +76,7 @@ ResultOrError<Ref<QuerySet>> 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));
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue