mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Fix loads of indentation issues with mixing spaces and tabs
This commit is contained in:
Vendored
+9
-9
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+3
-3
@@ -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 {
|
||||
|
||||
Vendored
+2
-2
@@ -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
@@ -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
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user