mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Remove use of if-catch-case
This commit is contained in:
@@ -225,11 +225,12 @@ fn char! read_next(JsonContext* context) @local
|
||||
char! c = context.stream.read_byte();
|
||||
if (catch err = c)
|
||||
{
|
||||
case IoError.EOF:
|
||||
if (err == IoError.EOF)
|
||||
{
|
||||
context.reached_end = true;
|
||||
return '\0';
|
||||
default:
|
||||
return err?;
|
||||
}
|
||||
return err?;
|
||||
}
|
||||
if (c == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user