equinor / segyio

Fast Python library for SEGY files.
Other
476 stars 214 forks source link

Wrap catr t/r arg parsing in compound statement #437

Closed jokva closed 4 years ago

jokva commented 4 years ago

The control flow for the t/r-case is pretty heavy, and uses a goto for early exit. This label was made a case label in the switch by accident, which was happily jumped to, but is wrong and awkward.

Wrapping the whole case in a compound statement provides some micro isolation, but more importantly makes the done label a proper goto label, not a switch case.

Closes #436