Skip to content
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

Double assignment to 'inComment' #106

Open
floooh opened this issue Nov 27, 2019 · 1 comment
Open

Double assignment to 'inComment' #106

floooh opened this issue Nov 27, 2019 · 1 comment

Comments

@floooh
Copy link

floooh commented Nov 27, 2019

Just found this because GCC gave me a "sequence point" warning (note how inComment is assigned twice):

inComment = inComment = (commentStartLine < currentLine || (commentStartLine == currentLine && commentStartIndex <= currentIndex));

Not sure if this is a simple typo, or whether there should indeed be two variables assigned.

@VeithBuergerhoff
Copy link

This appears to be a typo since inComment is a bool (no operator magic) and the right hand of the first inComment is the other inComment.

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

No branches or pull requests

2 participants