Skip to content

Commit

Permalink
Changed some ifs to else ifs.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 3, 2009
1 parent 796f2e2 commit e01f047
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mojoshader.c
Expand Up @@ -6668,22 +6668,22 @@ static int parse_token(Context *ctx)
if (isfail(ctx))
return FAIL; // just in case...catch previously unhandled fails here.

if (ctx->output_stack_len != 0)
else if (ctx->output_stack_len != 0)
return fail(ctx, "BUG: output stack isn't empty on new token!");

if (ctx->tokencount == 0)
else if (ctx->tokencount == 0)
return fail(ctx, "unexpected end of shader.");

if ((rc = parse_comment_token(ctx)) != 0)
else if ((rc = parse_comment_token(ctx)) != 0)
return rc;

if ((rc = parse_end_token(ctx)) != 0)
else if ((rc = parse_end_token(ctx)) != 0)
return rc;

if ((rc = parse_phase_token(ctx)) != 0)
else if ((rc = parse_phase_token(ctx)) != 0)
return rc;

if ((rc = parse_instruction_token(ctx)) != 0)
else if ((rc = parse_instruction_token(ctx)) != 0)
return rc;

return failf(ctx, "unknown token (%u)", (uint) *ctx->tokens);
Expand Down

0 comments on commit e01f047

Please sign in to comment.