formatting
This commit is contained in:
parent
3b01c70734
commit
3d110a1da5
@ -162,13 +162,12 @@
|
|||||||
#define StaticAssert1(cond, line, counter) StaticAssert2(cond, line, counter)
|
#define StaticAssert1(cond, line, counter) StaticAssert2(cond, line, counter)
|
||||||
#define StaticAssert(cond) StaticAssert1(cond, __LINE__, __COUNTER__)
|
#define StaticAssert(cond) StaticAssert1(cond, __LINE__, __COUNTER__)
|
||||||
|
|
||||||
//- Debug assert
|
//- Debug break
|
||||||
#if IsRtcEnabled
|
#if IsRtcEnabled
|
||||||
|
#define Assert(cond) ((cond) ? 1 : (IsRunningInDebugger() ? (*(volatile i32 *)0 = 0) : Panic(Lit(__FILE__ ":" Stringize(__LINE__) ":0: assertion failed: "Stringize(cond)""))))
|
||||||
#if IsCompilerMsvc
|
#if IsCompilerMsvc
|
||||||
#define Assert(cond) ((cond) ? 1 : (IsRunningInDebugger() ? (*(volatile i32 *)0 = 0) : Panic(Lit(__FILE__ ":" Stringize(__LINE__) ":0: assertion failed: "#cond""))))
|
|
||||||
#define DEBUGBREAK __debugbreak()
|
#define DEBUGBREAK __debugbreak()
|
||||||
#else
|
#else
|
||||||
#define Assert(cond) ((cond) ? 1 : (__builtin_trap(), 0))
|
|
||||||
#define DEBUGBREAK __builtin_debugtrap()
|
#define DEBUGBREAK __builtin_debugtrap()
|
||||||
#endif
|
#endif
|
||||||
#define DEBUGBREAKABLE { volatile i32 __DEBUGBREAKABLE_VAR = 0; __DEBUGBREAKABLE_VAR; } (void)0
|
#define DEBUGBREAKABLE { volatile i32 __DEBUGBREAKABLE_VAR = 0; __DEBUGBREAKABLE_VAR; } (void)0
|
||||||
@ -179,7 +178,7 @@
|
|||||||
//- Address sanitization
|
//- Address sanitization
|
||||||
#if IsAsanEnabled
|
#if IsAsanEnabled
|
||||||
void __asan_poison_memory_region(void const volatile *, size_t);
|
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 AsanPoison(addr, size) __asan_poison_memory_region((addr), (size))
|
||||||
#define AsanUnpoison(addr, size) __asan_unpoison_memory_region((addr), (size))
|
#define AsanUnpoison(addr, size) __asan_unpoison_memory_region((addr), (size))
|
||||||
#else
|
#else
|
||||||
@ -252,7 +251,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
//- Defer
|
//- 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
|
//- Preprocessor concatenation
|
||||||
#define CAT1(a, b) a ## b
|
#define CAT1(a, b) a ## b
|
||||||
|
|||||||
@ -83,7 +83,7 @@ void V_PushParticles(V_Emitter src)
|
|||||||
emitter->count = MinI64(remaining_particles, split_threshold);
|
emitter->count = MinI64(remaining_particles, split_threshold);
|
||||||
emitter->first_particle_seq = V.particle_seq;
|
emitter->first_particle_seq = V.particle_seq;
|
||||||
V.particle_seq += emitter->count;
|
V.particle_seq += emitter->count;
|
||||||
remaining_particles -= split_threshold;
|
remaining_particles -= emitter->count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user