Fix loads of indentation issues with mixing spaces and tabs

This commit is contained in:
gingerBill
2024-06-29 19:50:51 +01:00
parent 90244a0849
commit e296d6fb90
34 changed files with 760 additions and 763 deletions
+9 -9
View File
@@ -781,17 +781,17 @@ when !GL_DEBUG {
{
// add input arguments
for arg, arg_index in args[num_ret:] {
if arg_index > 0 { fmt.printf(", ") }
if arg_index > 0 { fmt.printf(", ") }
if v, ok := arg.(u32); ok { // TODO: Assumes all u32 are GLenum (they're not, GLbitfield and GLuint are also mapped to u32), fix later by better typing
if err == .INVALID_ENUM {
fmt.printf("INVALID_ENUM=%d", v)
if v, ok := arg.(u32); ok { // TODO: Assumes all u32 are GLenum (they're not, GLbitfield and GLuint are also mapped to u32), fix later by better typing
if err == .INVALID_ENUM {
fmt.printf("INVALID_ENUM=%d", v)
} else {
fmt.printf("GL_%v=%d", GL_Enum(v), v)
}
} else {
fmt.printf("GL_%v=%d", GL_Enum(v), v)
fmt.printf("%v", arg)
}
} else {
fmt.printf("%v", arg)
}
}
// add return arguments
@@ -810,7 +810,7 @@ when !GL_DEBUG {
}
// add location
fmt.printf(" in: %s(%d:%d)\n", from_loc.file_path, from_loc.line, from_loc.column)
fmt.printf(" in: %s(%d:%d)\n", from_loc.file_path, from_loc.line, from_loc.column)
}
}
+3 -3
View File
@@ -494,15 +494,15 @@ free_cstring :: proc "c" (str: cstring) {
free_rawptr(rawptr(str))
}
free_string :: proc "c" (s: string) {
free_rawptr(raw_data(s))
free_rawptr(raw_data(s))
}
free :: proc{free_rawptr, free_cstring}
// Wrap CMark allocator as Odin allocator
@(private)
cmark_allocator_proc :: proc(allocator_data: rawptr, mode: runtime.Allocator_Mode,
size, alignment: int,
old_memory: rawptr, old_size: int, loc := #caller_location) -> (res: []byte, err: runtime.Allocator_Error) {
size, alignment: int,
old_memory: rawptr, old_size: int, loc := #caller_location) -> (res: []byte, err: runtime.Allocator_Error) {
cmark_alloc := cast(^Allocator)allocator_data
switch mode {
+2 -2
View File
@@ -235,8 +235,8 @@ foreign lib {
// quit
QuitRequested :: #force_inline proc "c" () -> bool {
PumpEvents()
return bool(PeepEvents(nil, 0, .PEEKEVENT, .QUIT, .QUIT) > 0)
PumpEvents()
return bool(PeepEvents(nil, 0, .PEEKEVENT, .QUIT, .QUIT) > 0)
}
+1 -1
View File
@@ -798,7 +798,7 @@ API_VERSION_1_2 :: (1<<22) | (2<<12) | (0)
API_VERSION_1_3 :: (1<<22) | (3<<12) | (0)
MAKE_VERSION :: proc(major, minor, patch: u32) -> u32 {
return (major<<22) | (minor<<12) | (patch)
\treturn (major<<22) | (minor<<12) | (patch)
}
// Base types
+1 -1
View File
@@ -8,7 +8,7 @@ API_VERSION_1_2 :: (1<<22) | (2<<12) | (0)
API_VERSION_1_3 :: (1<<22) | (3<<12) | (0)
MAKE_VERSION :: proc(major, minor, patch: u32) -> u32 {
return (major<<22) | (minor<<12) | (patch)
return (major<<22) | (minor<<12) | (patch)
}
// Base types