mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
More minor stylization changes (remove unneeded parentheses)
This commit is contained in:
@@ -362,7 +362,7 @@ __dynamic_map_erase :: proc(using h: Map_Header, fr: Map_Find_Result) #no_bounds
|
||||
curr := __dynamic_map_get_entry(h, fr.entry_index);
|
||||
prev.next = curr.next;
|
||||
}
|
||||
if (fr.entry_index == m.entries.len-1) {
|
||||
if fr.entry_index == m.entries.len-1 {
|
||||
// NOTE(bill): No need to do anything else, just pop
|
||||
} else {
|
||||
old := __dynamic_map_get_entry(h, fr.entry_index);
|
||||
|
||||
@@ -600,19 +600,19 @@ truncsfhf2 :: proc "c" (value: f32) -> u16 {
|
||||
m = i & 0x007fffff;
|
||||
|
||||
|
||||
if (e <= 0) {
|
||||
if (e < -10) {
|
||||
if e <= 0 {
|
||||
if e < -10 {
|
||||
return u16(s);
|
||||
}
|
||||
m = (m | 0x00800000) >> u32(1 - e);
|
||||
|
||||
if (m & 0x00001000) != 0 {
|
||||
if m & 0x00001000 != 0 {
|
||||
m += 0x00002000;
|
||||
}
|
||||
|
||||
return u16(s | (m >> 13));
|
||||
} else if (e == 0xff - (127 - 15)) {
|
||||
if (m == 0) {
|
||||
} else if e == 0xff - (127 - 15) {
|
||||
if m == 0 {
|
||||
return u16(s | 0x7c00); /* NOTE(bill): infinity */
|
||||
} else {
|
||||
/* NOTE(bill): NAN */
|
||||
@@ -620,7 +620,7 @@ truncsfhf2 :: proc "c" (value: f32) -> u16 {
|
||||
return u16(s | 0x7c00 | m | i32(m == 0));
|
||||
}
|
||||
} else {
|
||||
if (m & 0x00001000) != 0 {
|
||||
if m & 0x00001000 != 0 {
|
||||
m += 0x00002000;
|
||||
if (m & 0x00800000) != 0 {
|
||||
m = 0;
|
||||
@@ -628,7 +628,7 @@ truncsfhf2 :: proc "c" (value: f32) -> u16 {
|
||||
}
|
||||
}
|
||||
|
||||
if (e > 30) {
|
||||
if e > 30 {
|
||||
f := i64(1e12);
|
||||
for j := 0; j < 10; j += 1 {
|
||||
/* NOTE(bill): Cause overflow */
|
||||
|
||||
Reference in New Issue
Block a user