diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-12-10 12:54:17 +0000 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-12-10 12:54:17 +0000 |
| commit | b18b0fdcb3f5f55ba298aa8245a95cf1626f2f75 (patch) | |
| tree | 27bcf3ced50e9a5291e5699512c5f5adb38eac1c | |
| parent | a72bdbb43d7ef02bad1cec4368e4f4641c48055d (diff) | |
Remove `fallthrough` to prefer a single `case`
| -rw-r--r-- | core/image/jpeg/jpeg.odin | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/core/image/jpeg/jpeg.odin b/core/image/jpeg/jpeg.odin index 241066273..3e0fae4c0 100644 --- a/core/image/jpeg/jpeg.odin +++ b/core/image/jpeg/jpeg.odin @@ -648,27 +648,17 @@ load_from_context :: proc(ctx: ^$C, options := Options{}, allocator := context.a color_components[id].v_sampling_factor = cast(int)vertical_sampling color_components[id].h_sampling_factor = cast(int)horizontal_sampling } - case .SOF2: // Progressive DCT - fallthrough - case .SOF3: // Lossless (sequential) - fallthrough - case .SOF5: // Differential sequential DCT - fallthrough - case .SOF6: // Differential progressive DCT - fallthrough - case .SOF7: // Differential lossless (sequential) - fallthrough - case .SOF9: // Extended sequential DCT, Arithmetic coding - fallthrough - case .SOF10: // Progressive DCT, Arithmetic coding - fallthrough - case .SOF11: // Lossless (sequential), Arithmetic coding - fallthrough - case .SOF13: // Differential sequential DCT, Arithmetic coding - fallthrough - case .SOF14: // Differential progressive DCT, Arithmetic coding - fallthrough - case .SOF15: // Differential lossless (sequential), Arithmetic coding + case .SOF2, // Progressive DCT + .SOF3, // Lossless (sequential) + .SOF5, // Differential sequential DCT + .SOF6, // Differential progressive DCT + .SOF7, // Differential lossless (sequential) + .SOF9:, // Extended sequential DCT, Arithmetic coding + .SOF10, // Progressive DCT, Arithmetic coding + .SOF11, // Lossless (sequential), Arithmetic coding + .SOF13, // Differential sequential DCT, Arithmetic coding + .SOF14, // Differential progressive DCT, Arithmetic coding + .SOF15: // Differential lossless (sequential), Arithmetic coding if img.metadata != nil { info := img.metadata.(^image.JPEG_Info) info.frame_type = marker |