mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Keep -vet and -strict-style happy
This commit is contained in:
Vendored
+1
-1
@@ -2,5 +2,5 @@ package sdl3
|
|||||||
|
|
||||||
@(export)
|
@(export)
|
||||||
foreign import lib {
|
foreign import lib {
|
||||||
"SDL3.lib"
|
"SDL3.lib",
|
||||||
}
|
}
|
||||||
Vendored
-1
@@ -2,7 +2,6 @@ package sdl3
|
|||||||
|
|
||||||
import "base:intrinsics"
|
import "base:intrinsics"
|
||||||
import "core:c"
|
import "core:c"
|
||||||
import "core:strings"
|
|
||||||
|
|
||||||
TriggerBreakpoint :: intrinsics.debug_trap
|
TriggerBreakpoint :: intrinsics.debug_trap
|
||||||
AssertBreakpoint :: TriggerBreakpoint
|
AssertBreakpoint :: TriggerBreakpoint
|
||||||
|
|||||||
Vendored
+8
-8
@@ -13,12 +13,12 @@ BYTEORDER :: LIL_ENDIAN when ODIN_ENDIAN == .Little else BIG_ENDIAN
|
|||||||
@(require_results) SwapFloat :: #force_inline proc "c" (x: f32) -> f32 { return intrinsics.byte_swap(x) }
|
@(require_results) SwapFloat :: #force_inline proc "c" (x: f32) -> f32 { return intrinsics.byte_swap(x) }
|
||||||
|
|
||||||
|
|
||||||
@(require_results) Swap16LE :: #force_inline proc "c" (x: Uint16) -> Uint16 { return Uint16(transmute(u16le)x) }
|
@(require_results) Swap16LE :: #force_inline proc "c" (x: Uint16) -> Uint16 { x := x; return Uint16((^u16le)(&x)^) }
|
||||||
@(require_results) Swap32LE :: #force_inline proc "c" (x: Uint32) -> Uint32 { return Uint32(transmute(u32le)x) }
|
@(require_results) Swap32LE :: #force_inline proc "c" (x: Uint32) -> Uint32 { x := x; return Uint32((^u32le)(&x)^) }
|
||||||
@(require_results) Swap64LE :: #force_inline proc "c" (x: Uint64) -> Uint64 { return Uint64(transmute(u64le)x) }
|
@(require_results) Swap64LE :: #force_inline proc "c" (x: Uint64) -> Uint64 { x := x; return Uint64((^u64le)(&x)^) }
|
||||||
@(require_results) SwapFloatLE :: #force_inline proc "c" (x: f32) -> f32 { return f32 (transmute(f32le)x) }
|
@(require_results) SwapFloatLE :: #force_inline proc "c" (x: f32) -> f32 { x := x; return f32 ((^f32le)(&x)^) }
|
||||||
|
|
||||||
@(require_results) Swap16BE :: #force_inline proc "c" (x: Uint16) -> Uint16 { return Uint16(transmute(u16be)x) }
|
@(require_results) Swap16BE :: #force_inline proc "c" (x: Uint16) -> Uint16 { x := x; return Uint16((^u16be)(&x)^) }
|
||||||
@(require_results) Swap32BE :: #force_inline proc "c" (x: Uint32) -> Uint32 { return Uint32(transmute(u32be)x) }
|
@(require_results) Swap32BE :: #force_inline proc "c" (x: Uint32) -> Uint32 { x := x; return Uint32((^u32be)(&x)^) }
|
||||||
@(require_results) Swap64BE :: #force_inline proc "c" (x: Uint64) -> Uint64 { return Uint64(transmute(u64be)x) }
|
@(require_results) Swap64BE :: #force_inline proc "c" (x: Uint64) -> Uint64 { x := x; return Uint64((^u64be)(&x)^) }
|
||||||
@(require_results) SwapFloatBE :: #force_inline proc "c" (x: f32) -> f32 { return f32 (transmute(f32be)x) }
|
@(require_results) SwapFloatBE :: #force_inline proc "c" (x: f32) -> f32 { x := x; return f32 ((^f32be)(&x)^) }
|
||||||
Vendored
+1
-1
@@ -33,7 +33,7 @@ IOStreamInterface :: struct {
|
|||||||
|
|
||||||
#assert(
|
#assert(
|
||||||
(size_of(IOStreamInterface) == 28 && size_of(rawptr) == 4) ||
|
(size_of(IOStreamInterface) == 28 && size_of(rawptr) == 4) ||
|
||||||
(size_of(IOStreamInterface) == 56 && size_of(rawptr) == 8)
|
(size_of(IOStreamInterface) == 56 && size_of(rawptr) == 8),
|
||||||
)
|
)
|
||||||
|
|
||||||
IOStream :: struct {}
|
IOStream :: struct {}
|
||||||
|
|||||||
Reference in New Issue
Block a user