diff --git a/core/image/png/png.odin b/core/image/png/png.odin index 4880f1f51..2964348d9 100644 --- a/core/image/png/png.odin +++ b/core/image/png/png.odin @@ -441,7 +441,7 @@ load_from_stream :: proc(stream: io.Stream, options := Options{}, allocator := c } // name := chunk_type_to_name(&ch.type); // Only used for debug prints during development. - #partial switch(ch.type) { + #partial switch ch.type { case .IHDR: if seen_ihdr || !first { return {}, E_PNG.IHDR_Not_First_Chunk; @@ -575,7 +575,7 @@ load_from_stream :: proc(stream: io.Stream, options := Options{}, allocator := c } ct := transmute(u8)info.header.color_type; - switch(ct) { + switch ct { case 3: // Indexed color if c.header.length != 1 { return {}, E_PNG.BKGD_Invalid_Length; diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin index 6e1cacd81..9dd54e8bb 100644 --- a/core/os/os_darwin.odin +++ b/core/os/os_darwin.odin @@ -337,7 +337,7 @@ write :: proc(fd: Handle, data: []u8) -> (int, Errno) { return 0, 0; } bytes_written := _unix_write(fd, raw_data(data), len(data)); - if(bytes_written == -1) { + if bytes_written == -1 { return 0, 1; } return bytes_written, 0; diff --git a/core/runtime/dynamic_map_internal.odin b/core/runtime/dynamic_map_internal.odin index aff3b9859..fce247e9b 100644 --- a/core/runtime/dynamic_map_internal.odin +++ b/core/runtime/dynamic_map_internal.odin @@ -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); diff --git a/core/runtime/internal.odin b/core/runtime/internal.odin index cf55fdddd..0328055cf 100644 --- a/core/runtime/internal.odin +++ b/core/runtime/internal.odin @@ -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 */ diff --git a/core/text/scanner/scanner.odin b/core/text/scanner/scanner.odin index 9520b52df..7c47c2704 100644 --- a/core/text/scanner/scanner.odin +++ b/core/text/scanner/scanner.odin @@ -526,7 +526,7 @@ scan :: proc(s: ^Scanner) -> (tok: rune) { s.pos.line = 0; redo: for { - for (ch < utf8.RUNE_SELF && ch in s.whitespace) { + for ch < utf8.RUNE_SELF && (ch in s.whitespace) { ch = advance(s); }