Skip to content

dead-code patch by renu555 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 6, 2014

Conversation

cdunn2001
Copy link
Contributor

renu555 added 3 commits July 5, 2014 19:05
  if (!isMultiLine) at line 563 suggests that isMultiline is 0 when if takes true branch. So the condition && at line 571 will always be false.
Also at line 568 !isMultiline in loop conditional check suggests that it depends only on one condition i.e. index <size because !isMultiline is always true. 
Hence , it seems logical mistake at line 571 of using && instead of ||
Changes explained
    for (int index = 0; index < size && !isMultiLine; ++index) 
In addition to dead code, in the above if condition checking to !isMultiLine is of no use as it will be always true and hence "for" depends only on condition [index < size.]
The mentioned test case works fine in this case also.
cdunn2001 added a commit that referenced this pull request Jul 6, 2014
@cdunn2001 cdunn2001 merged commit 973de39 into open-source-parsers:master Jul 6, 2014
@cdunn2001 cdunn2001 deleted the patch-renu555 branch July 6, 2014 02:11
@hcngac hcngac mentioned this pull request Jul 14, 2016
@ghost ghost mentioned this pull request Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant