mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Build sanitization & Static analysis warning fixes
- Wrapping FORCEINLINE & WIN32_LEAN_AND_MEAN definess with ifndef bc other libraries may define it and trigger redefinition warning - Possibly contentious given tone in the manual (:P) but removing variable shadowing in TracySysTrace.cpp - Alternate Solution: Add #define TRACY_FORCE_SILENT_WARNINGS toggle-able flag. If flag is enabled, push/pop warning disables that have to be included in client code
This commit is contained in:
@@ -110,13 +110,17 @@
|
||||
#define _Static_assert static_assert
|
||||
|
||||
/// Platform and arch specifics
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
# define FORCEINLINE inline __forceinline
|
||||
#else
|
||||
# define FORCEINLINE inline __attribute__((__always_inline__))
|
||||
#ifndef FORCEINLINE
|
||||
# if defined(_MSC_VER) && !defined(__clang__)
|
||||
# define FORCEINLINE inline __forceinline
|
||||
# else
|
||||
# define FORCEINLINE inline __attribute__((__always_inline__))
|
||||
# endif
|
||||
#endif
|
||||
#if PLATFORM_WINDOWS
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# ifndef WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# endif
|
||||
# include <windows.h>
|
||||
# if ENABLE_VALIDATE_ARGS
|
||||
# include <Intsafe.h>
|
||||
|
||||
Reference in New Issue
Block a user