diff options
author | Rose <83477269+AtariDreams@users.noreply.github.com> | 2023-02-16 12:31:07 -0500 |
---|---|---|
committer | Rose <83477269+AtariDreams@users.noreply.github.com> | 2023-02-16 12:34:51 -0500 |
commit | fd02f6a4bdbdb5b824da5c80a2832be5549391ca (patch) | |
tree | 5038674bd090431c14166a0aa2d47546c419034d /absl/base/internal | |
parent | 2d4c6872da56fa0d8156b01ab5658348d9c5de4d (diff) |
Prefer C++ notation over C
nullptr instead of 0 and nothing instead of void for function arguments is preferred.
Diffstat (limited to 'absl/base/internal')
-rw-r--r-- | absl/base/internal/low_level_alloc.cc | 2 | ||||
-rw-r--r-- | absl/base/internal/sysinfo.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/absl/base/internal/low_level_alloc.cc b/absl/base/internal/low_level_alloc.cc index 662167b0..3f888f2f 100644 --- a/absl/base/internal/low_level_alloc.cc +++ b/absl/base/internal/low_level_alloc.cc @@ -550,7 +550,7 @@ static void *DoAllocWithArena(size_t request, LowLevelAlloc::Arena *arena) { size_t new_pages_size = RoundUp(req_rnd, arena->pagesize * 16); void *new_pages; #ifdef _WIN32 - new_pages = VirtualAlloc(0, new_pages_size, + new_pages = VirtualAlloc(nullptr, new_pages_size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); ABSL_RAW_CHECK(new_pages != nullptr, "VirtualAlloc failed"); #else diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc index da499d3a..8429fb90 100644 --- a/absl/base/internal/sysinfo.cc +++ b/absl/base/internal/sysinfo.cc @@ -159,7 +159,7 @@ static double GetNominalCPUFrequency() { DWORD type = 0; DWORD data = 0; DWORD data_size = sizeof(data); - auto result = RegQueryValueExA(key, "~MHz", 0, &type, + auto result = RegQueryValueExA(key, "~MHz", nullptr, &type, reinterpret_cast<LPBYTE>(&data), &data_size); RegCloseKey(key); if (result == ERROR_SUCCESS && type == REG_DWORD && |