Commit 9afb6e69 authored by Lukasz Anforowicz's avatar Lukasz Anforowicz Committed by Commit Bot

Including <stddef.h> instead of <cstddef>.

Google C++ Style Guide [1] is neutral on this subject, but asks to be
consistent with surrounding code:

    Note that the C headers such as stddef.h are essentially
    interchangeable with their C++ counterparts (cstddef). Either style
    is acceptable, but prefer consistency with existing code.

Most of Chromium uses <stddef.h> and this was confirmed in a 2019
discussion on cxx@chromium.org [2], so let's switch checked_ptr.h to use
<stddef.h> instead of <cstddef>.

[1] https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes
[2] https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/cxx/Bc1XyEL9pp4/Ie4C-_AjCAAJ

Bug: 1073933
Change-Id: I8a844e32fd5f1ced327932e8cfd27bc6555a4cd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2209603Reviewed-by: default avatardanakj <danakj@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770781}
parent d2f2dad4
......@@ -5,8 +5,9 @@
#ifndef BASE_MEMORY_CHECKED_PTR_H_
#define BASE_MEMORY_CHECKED_PTR_H_
#include <cstddef>
#include <cstdint>
#include <stddef.h>
#include <stdint.h>
#include <utility>
#include "base/compiler_specific.h"
......@@ -101,7 +102,7 @@ class CheckedPtr {
// Deliberately implicit, because CheckedPtr is supposed to resemble raw ptr.
// NOLINTNEXTLINE(runtime/explicit)
constexpr ALWAYS_INLINE CheckedPtr(std::nullptr_t) noexcept
constexpr ALWAYS_INLINE CheckedPtr(nullptr_t) noexcept
: wrapped_ptr_(Impl::GetWrappedNullPtr()) {}
// Deliberately implicit, because CheckedPtr is supposed to resemble raw ptr.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment