mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-25 22:30:49 +08:00
Fix #includes
- Where std::nullptr_t is used (in namespace std), #include <cstddef>, even if it appears alongside <stddef.h> because types like intptr_t are used (in the root namespace). - Where math library functions are used, #include <cmath> to get and use the versions of functions in namespace std which are overloaded by argument type, such as std::isinf and std::isnan. third_party is excluded. Change-Id: Ic9c143f407e5a9c5cff4098cf566ba5caf4bf6d8 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/6021439 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
65a45013d0
commit
3b0a429371
@ -16,11 +16,11 @@
|
||||
#define CRASHPAD_SNAPSHOT_LINUX_SNAPSHOT_SIGNAL_CONTEXT_H_
|
||||
|
||||
#include <signal.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ucontext.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <type_traits>
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
#ifndef CRASHPAD_UTIL_MISC_FROM_POINTER_CAST_H_
|
||||
#define CRASHPAD_UTIL_MISC_FROM_POINTER_CAST_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <cstddef>
|
||||
|
@ -15,10 +15,10 @@
|
||||
#include "util/synchronization/semaphore.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/logging.h"
|
||||
@ -43,7 +43,7 @@ void Semaphore::Wait() {
|
||||
bool Semaphore::TimedWait(double seconds) {
|
||||
DCHECK_GE(seconds, 0.0);
|
||||
|
||||
if (isinf(seconds)) {
|
||||
if (std::isinf(seconds)) {
|
||||
Wait();
|
||||
return true;
|
||||
}
|
||||
@ -81,7 +81,7 @@ void Semaphore::Wait() {
|
||||
bool Semaphore::TimedWait(double seconds) {
|
||||
DCHECK_GE(seconds, 0.0);
|
||||
|
||||
if (isinf(seconds)) {
|
||||
if (std::isinf(seconds)) {
|
||||
Wait();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user