Indent #ifdef blocks, improve comment for MSVC pragma.
PiperOrigin-RevId: 451614625 Change-Id: I5b46572521955b51da48f183d2195817df6ea28d
This commit is contained in:
committed by
Copybara-Service
parent
79082ea1ae
commit
e94a46c20f
@@ -28,21 +28,21 @@
|
|||||||
#include "engine/engine_vfs.h"
|
#include "engine/engine_vfs.h"
|
||||||
|
|
||||||
#ifdef ADDRESS_SANITIZER
|
#ifdef ADDRESS_SANITIZER
|
||||||
#include <sanitizer/asan_interface.h>
|
#include <sanitizer/asan_interface.h>
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define ASAN_POISON_MEMORY_REGION(addr, size)
|
#define ASAN_POISON_MEMORY_REGION(addr, size)
|
||||||
#define ASAN_UNPOISON_MEMORY_REGION(addr, size)
|
#define ASAN_UNPOISON_MEMORY_REGION(addr, size)
|
||||||
#else
|
#else
|
||||||
#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
|
#define ASAN_POISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
|
||||||
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
|
#define ASAN_UNPOISON_MEMORY_REGION(addr, size) ((void)(addr), (void)(size))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MEMORY_SANITIZER
|
#ifdef MEMORY_SANITIZER
|
||||||
#include <sanitizer/msan_interface.h>
|
#include <sanitizer/msan_interface.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning (disable: 4305) // tell MSVC to not complain that float x = 0.1 should be 0.1f
|
#pragma warning (disable: 4305) // disable MSVC warning: truncation from 'double' to 'float'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PTRDIFF(x, y) ((void*)(x) - (void*)(y))
|
#define PTRDIFF(x, y) ((void*)(x) - (void*)(y))
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "engine/engine_util_misc.h"
|
#include "engine/engine_util_misc.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning (disable: 4305) // tell MSVC to not complain that float x = 0.1 should be 0.1f
|
#pragma warning (disable: 4305) // disable MSVC warning: truncation from 'double' to 'float'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user