Skip to content

Commit 31b5bdc

Browse files
committed
simplify condition flow in matching_bracket
1 parent 86ef12a commit 31b5bdc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

loadjson.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,15 +485,13 @@ function error_pos(msg, inStr)
485485
endpos=bpos(pos);
486486
return
487487
end
488-
end
489-
if(c=='[')
488+
elseif(c=='[')
490489
if(isempty(e1l))
491490
e1l=bpos(pos);
492491
end
493492
level=level+1;
494493
maxlevel=max(maxlevel,level);
495-
end
496-
if(c=='"')
494+
elseif(c=='"')
497495
pos=matching_quote(tokens,pos+1);
498496
end
499497
pos=pos+1;

0 commit comments

Comments
 (0)