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

src/Cmd/CmdAddPointsGraph.cpp :65: possible wrong operator ? #421

Open
dcb314 opened this issue Apr 8, 2022 · 0 comments
Open

src/Cmd/CmdAddPointsGraph.cpp :65: possible wrong operator ? #421

dcb314 opened this issue Apr 8, 2022 · 0 comments

Comments

@dcb314
Copy link

dcb314 commented Apr 8, 2022

New compiler clang-14 says

src/Cmd/CmdAddPointsGraph.cpp:65:9: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead
-of-logical]

Source code is

if ((reader.tokenType() == QXmlStreamReader::EndElement) &
(reader.name() == DOCUMENT_SERIALIZE_CMD)) {

Maybe better code

if ((reader.tokenType() == QXmlStreamReader::EndElement) &&
(reader.name() == DOCUMENT_SERIALIZE_CMD)) {

clang-14 also says:

src/Cmd/CmdEditPointGraph.cpp:85:11: warning: use of bitwise '&' with boolean operands [-Wbitwise-instea
d-of-logical]

This is a duplicate.

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

1 participant