From 3d110a1da53b7969e39d327cd1b7631dcb14bd61 Mon Sep 17 00:00:00 2001 From: jacob Date: Thu, 19 Mar 2026 14:39:21 -0500 Subject: [PATCH] formatting --- src/base/base.cgh | 9 ++++----- src/pp/pp_vis/pp_vis_core.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/base/base.cgh b/src/base/base.cgh index ff5c4ca3..ac97d9c9 100644 --- a/src/base/base.cgh +++ b/src/base/base.cgh @@ -162,13 +162,12 @@ #define StaticAssert1(cond, line, counter) StaticAssert2(cond, line, counter) #define StaticAssert(cond) StaticAssert1(cond, __LINE__, __COUNTER__) -//- Debug assert +//- Debug break #if IsRtcEnabled + #define Assert(cond) ((cond) ? 1 : (IsRunningInDebugger() ? (*(volatile i32 *)0 = 0) : Panic(Lit(__FILE__ ":" Stringize(__LINE__) ":0: assertion failed: "Stringize(cond)"")))) #if IsCompilerMsvc - #define Assert(cond) ((cond) ? 1 : (IsRunningInDebugger() ? (*(volatile i32 *)0 = 0) : Panic(Lit(__FILE__ ":" Stringize(__LINE__) ":0: assertion failed: "#cond"")))) #define DEBUGBREAK __debugbreak() #else - #define Assert(cond) ((cond) ? 1 : (__builtin_trap(), 0)) #define DEBUGBREAK __builtin_debugtrap() #endif #define DEBUGBREAKABLE { volatile i32 __DEBUGBREAKABLE_VAR = 0; __DEBUGBREAKABLE_VAR; } (void)0 @@ -179,7 +178,7 @@ //- Address sanitization #if IsAsanEnabled void __asan_poison_memory_region(void const volatile *, size_t); - void __asan_unpoison_memory_region(void const volatile *add, size_t); + void __asan_unpoison_memory_region(void const volatile *, size_t); #define AsanPoison(addr, size) __asan_poison_memory_region((addr), (size)) #define AsanUnpoison(addr, size) __asan_unpoison_memory_region((addr), (size)) #else @@ -252,7 +251,7 @@ #endif //- Defer -#define DeferFor(begin, end) for(i32 __defer_loop__ = ((begin), 0); !__defer_loop__; __defer_loop__ = 1, (end)) +#define DeferFor(begin, end) for(i32 __defer_for__ = ((begin), 0); !__defer_for__; __defer_for__ = 1, (end)) //- Preprocessor concatenation #define CAT1(a, b) a ## b diff --git a/src/pp/pp_vis/pp_vis_core.c b/src/pp/pp_vis/pp_vis_core.c index ad9ab684..df24c8b3 100644 --- a/src/pp/pp_vis/pp_vis_core.c +++ b/src/pp/pp_vis/pp_vis_core.c @@ -83,7 +83,7 @@ void V_PushParticles(V_Emitter src) emitter->count = MinI64(remaining_particles, split_threshold); emitter->first_particle_seq = V.particle_seq; V.particle_seq += emitter->count; - remaining_particles -= split_threshold; + remaining_particles -= emitter->count; } }