Cosmetic changes
This commit is contained in:
@@ -14,8 +14,8 @@ be nice if handling of that was simplified.
|
||||
main :: (): int
|
||||
static_array: [8]int
|
||||
|
||||
// We can get size of array using length_of builtin
|
||||
#Assert(length_of(static_array) == 8)
|
||||
// We can get size of array using Length builtin
|
||||
#Assert(Length(static_array) == 8)
|
||||
|
||||
// Accessing values is like in C
|
||||
// Variables are zeroed by default
|
||||
@@ -39,7 +39,7 @@ main :: (): int
|
||||
slice: []int = static_array
|
||||
|
||||
// We can't do a compile time Assert anymore
|
||||
Assert(length_of(slice) == 8)
|
||||
Assert(Length(slice) == 8)
|
||||
Assert(slice[4] == 1)
|
||||
|
||||
// After we loop and reassign slice values
|
||||
|
||||
@@ -26,7 +26,7 @@ CreateBitmap :: (size: Vec2I, bottom_up: Bool = true): Windows_Bitmap
|
||||
|
||||
bminfo := BITMAPINFO{
|
||||
BITMAPINFOHEADER{
|
||||
biSize = 40, // @todo!!! size_of(BITMAPINFOHEADER),
|
||||
biSize = 40, // @todo!!! SizeOf(BITMAPINFOHEADER),
|
||||
biWidth = size.x->LONG,
|
||||
biHeight = size.y->LONG,
|
||||
biPlanes = 1,
|
||||
|
||||
@@ -14,10 +14,10 @@ main :: (): int
|
||||
return 1
|
||||
|
||||
if type_info.type == S64
|
||||
// We can use size_of and align_of operators
|
||||
// We can use SizeOf and AlignOf operators
|
||||
// to figure out the type alignment and it's size
|
||||
Assert(type_info.size == size_of(S64))
|
||||
Assert(type_info.align == align_of(S64))
|
||||
Assert(type_info.size == SizeOf(S64))
|
||||
Assert(type_info.align == AlignOf(S64))
|
||||
|
||||
else;; Assert(false, "We expected S64 here! What a boomer!")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user