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

qgis-2.0.1/src/gui/qgscomposerview.cpp: 2* bad if test ? #17896

Closed
qgib opened this issue Jan 3, 2014 · 2 comments
Closed

qgis-2.0.1/src/gui/qgscomposerview.cpp: 2* bad if test ? #17896

qgib opened this issue Jan 3, 2014 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@qgib
Copy link
Contributor

qgib commented Jan 3, 2014

Author Name: David Binderman (David Binderman)
Original Redmine Issue: 9285
Affected QGIS version: 2.0.1


I just ran the static analyser "cppcheck" over the
source code of qgis-2.0.1

It said many things, including

qgis-2.0.1/src/gui/qgscomposerview.cpp:226]: (style) Same expression on both sides of '||'.

Source code is

if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )

Maybe

if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().height() < 0.1 )

might be better code.

qgis-2.0.1/src/gui/qgscomposerview.cpp:318]: (style) Same expression on both sides of '||'.

Duplicate.

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2014

Author Name: Nyall Dawson (@nyalldawson)


Fixed in changeset "bee12917270c5d286ff0915c727381eb08e9e017".


  • status_id was changed from Open to Closed

@qgib
Copy link
Contributor Author

qgib commented Jan 4, 2014

Author Name: Nyall Dawson (@nyalldawson)


Good catch -- thanks!

@qgib qgib added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
Development

No branches or pull requests

1 participant