diff options
| author | Stefan Boberg <[email protected]> | 2025-10-28 22:34:52 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-10-28 22:34:52 +0100 |
| commit | 9c2cdc2345880f18b67af6b7b5c11d0ce9041ced (patch) | |
| tree | dc868fb7368df37e7c3645f4cadea8bf73303505 /src/zencore/include | |
| parent | 5.7.7 (diff) | |
| download | zen-9c2cdc2345880f18b67af6b7b5c11d0ce9041ced.tar.xz zen-9c2cdc2345880f18b67af6b7b5c11d0ce9041ced.zip | |
fix --zentrace=no compile errors (#616)
* make sure the correct `UE_WITH_TRACE` conditional is used to enable/disable support code as appropriate
* fixed some accidental `int32`, `int64` et al usage, due to typedefs leaking through from trace header
with this fix, it is now possible to build with `--zentrace=no` again
Diffstat (limited to 'src/zencore/include')
| -rw-r--r-- | src/zencore/include/zencore/memory/memorytrace.h | 6 | ||||
| -rw-r--r-- | src/zencore/include/zencore/memory/tagtrace.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/zencore/include/zencore/memory/memorytrace.h b/src/zencore/include/zencore/memory/memorytrace.h index 6be7adb89..51bc78bde 100644 --- a/src/zencore/include/zencore/memory/memorytrace.h +++ b/src/zencore/include/zencore/memory/memorytrace.h @@ -16,7 +16,7 @@ # define PLATFORM_USES_FIXED_GMalloc_CLASS 0 #endif -#if !defined(UE_MEMORY_TRACE_ENABLED) && UE_TRACE_ENABLED +#if !defined(UE_MEMORY_TRACE_ENABLED) && ZEN_WITH_TRACE # if UE_MEMORY_TRACE_AVAILABLE # define UE_MEMORY_TRACE_ENABLED ZEN_WITH_MEMTRACK # endif @@ -63,7 +63,7 @@ enum class EMemoryTraceHeapAllocationFlags : uint8_t ENUM_CLASS_FLAGS(EMemoryTraceHeapAllocationFlags); //////////////////////////////////////////////////////////////////////////////// -enum class EMemoryTraceSwapOperation : uint8 +enum class EMemoryTraceSwapOperation : uint8_t { PageOut = 0, // Paged out to swap PageIn = 1, // Read from swap via page fault @@ -74,7 +74,7 @@ enum class EMemoryTraceSwapOperation : uint8 // Internal options for early initialization of memory tracing systems. Exposed // here due to visibility in platform implementations. -enum class EMemoryTraceInit : uint8 +enum class EMemoryTraceInit : uint8_t { Disabled = 0, AllocEvents = 1 << 0, diff --git a/src/zencore/include/zencore/memory/tagtrace.h b/src/zencore/include/zencore/memory/tagtrace.h index 8b5fc0e67..ebc9b2db4 100644 --- a/src/zencore/include/zencore/memory/tagtrace.h +++ b/src/zencore/include/zencore/memory/tagtrace.h @@ -23,7 +23,7 @@ inline constexpr int32_t TRACE_TAG = 257; # define UE_MEMORY_TAGS_TRACE_ENABLED 1 #endif -#if UE_MEMORY_TAGS_TRACE_ENABLED && UE_TRACE_ENABLED +#if UE_MEMORY_TAGS_TRACE_ENABLED && ZEN_WITH_TRACE namespace zen { //////////////////////////////////////////////////////////////////////////////// @@ -76,6 +76,8 @@ private: UE::Trace::Private::FScopedLogScope Inner; }; +} // namespace zen + //////////////////////////////////////////////////////////////////////////////// # define ZEN_MEMSCOPE(InTag) FMemScope PREPROCESSOR_JOIN(MemScope, __LINE__)(InTag); # define ZEN_MEMSCOPE_PTR(InPtr) FMemScopePtr PREPROCESSOR_JOIN(MemPtrScope, __LINE__)((uint64)InPtr); @@ -91,4 +93,3 @@ private: # define ZEN_MEMSCOPE_UNINITIALIZED(...) #endif // UE_MEMORY_TAGS_TRACE_ENABLED -} |