Add more uses of #no_capture

This commit is contained in:
gingerBill
2024-07-14 11:56:04 +01:00
parent edc793d7c1
commit c7bd954752
19 changed files with 64 additions and 64 deletions
+1 -1
View File
@@ -754,7 +754,7 @@ when !GL_DEBUG {
MultiDrawElementsIndirectCount :: proc "c" (mode: i32, type: i32, indirect: [^]DrawElementsIndirectCommand, drawcount: i32, maxdrawcount, stride: i32) { impl_MultiDrawElementsIndirectCount(mode, type, indirect, drawcount, maxdrawcount, stride) }
PolygonOffsetClamp :: proc "c" (factor, units, clamp: f32) { impl_PolygonOffsetClamp(factor, units, clamp) }
} else {
debug_helper :: proc"c"(from_loc: runtime.Source_Code_Location, num_ret: int, args: ..any, loc := #caller_location) {
debug_helper :: proc"c"(from_loc: runtime.Source_Code_Location, num_ret: int, #no_capture args: ..any, loc := #caller_location) {
context = runtime.default_context()
Error_Enum :: enum {
+2 -2
View File
@@ -1667,7 +1667,7 @@ IsGestureDetected :: proc "c" (gesture: Gesture) -> bool {
// Text formatting with variables (sprintf style)
TextFormat :: proc(text: cstring, args: ..any) -> cstring {
TextFormat :: proc(text: cstring, #no_capture args: ..any) -> cstring {
@static buffers: [MAX_TEXTFORMAT_BUFFERS][MAX_TEXT_BUFFER_LENGTH]byte
@static index: u32
@@ -1683,7 +1683,7 @@ TextFormat :: proc(text: cstring, args: ..any) -> cstring {
}
// Text formatting with variables (sprintf style) and allocates (must be freed with 'MemFree')
TextFormatAlloc :: proc(text: cstring, args: ..any) -> cstring {
TextFormatAlloc :: proc(text: cstring, #no_capture args: ..any) -> cstring {
str := fmt.tprintf(string(text), ..args)
return strings.clone_to_cstring(str, MemAllocator())
}